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


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


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


The visual element's size and location.


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:

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

The item's height

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

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.


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

See Also


  • No labels