Returns an item's size and location.

Syntax

Rect = Send_Message(Ctrl, "OLE.GetItemRect", Item)

Parameters

ParameterDescription
ItemThe item whose rectangle to get.

Returns

The item's size and location.

Remarks

The GetItemRect method returns the size and location of the given item. The Item parameter must be a key to a valid item. If the item is currently in view, then it's rectangle is returned. 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>HeightIntegerThe item's height

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

Example

// Get Item's rectangle 
ItemRect = Send_Message(@Window:".OLE_TREE", "OLE.GetItemRect", "Item1")

See Also

GetItemRectEx

  • No labels