Returns the size and location of an item's specific visual element.
Syntax
Rect = Send_Message(Ctrl, "OLE.GetItemRectEx", Item, Element)
Parameters
Parameter | Description |
---|---|
Item | The item whose visual element rectangle to get. |
Element | The 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:
Pos | Name | Type | Description |
---|---|---|---|
<1> | X | Integer | The item's x position |
<2> | Y | Integer | The item's y position |
<3> | Width | Integer | The item's width |
<4> | Height | Integer | The item's height |
The Element parameter must reference on of the following visual elements of the item by name:
Name | Description |
---|---|
Button | The size and location of the expansion button, if there is one |
CheckBox | The size and location of the checkbox, if there is one |
Content | The size and location of the item's content, which includes both text and image |
Edit | The size and location of the where the editfield would appear when the item is in edit mode |
Image | The size and location of the image, if there is one |
Selectable | The size and location of the selectable region of an item, the area where clicking the item selects it |
Text | The 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")