Returns the size and location of an item's specific visual element.

Syntax

Rect = Send_Message(Ctrl, "OLE.GetItemRectEx", Item, Element)

Parameters

ParameterDescription
ItemThe item whose visual element rectangle to get.
ElementThe visual element of the item whose size and location to get.

Returns

The visual element's size and location.

Remarks

The GetItemRectEx method returns the size and location of a given item's visual element. The Item parameter must be a key to a valid item and the item must be in view. If the item is not in view, then "" is returned. The returned value uses the same multivalue structure as the standard OpenInsight SIZE property:

PosNameTypeDescription
<1>XIntegerThe item's x position
<2>YIntegerThe item's y position
<3>WidthIntegerThe item's width
<4>HeightInteger

The item's height

The Element parameter must reference on of the following visual elements of the item by name:

NameDescription
ButtonThe size and location of the expansion button, if there is one
CheckBoxThe size and location of the checkbox, if there is one
ContentThe size and location of the item's content, which includes both text and image
EditThe size and location of the where the editfield would appear when the item is in edit mode
ImageThe size and location of the image, if there is one
SelectableThe size and location of the selectable region of an item, the area where clicking the item selects it
TextThe size and location of the text

The position of the item is relative to the upper left corner of the SRP Tree Control's client area.

Example

// Get rectangle encompassing both image and text
ItemContectRect = Send_Message(@Window:".OLE_TREE", "OLE.GetItemRectEx", "Item1", "Content")

See Also

GetItemRect

  • No labels