The tree item with focus
Usage
Set_Property(OLECtrlEntID, "OLE.FocusItem", StringValue)
Values
StringValue can be any string meeting the following format requirements:
Syntax: Unique tree item key
Default: ""
Remarks
The FocusItem property gets and sets the item with focus. The value is a key to a single tree item. When the tree control has focus, the focus item appears with a dotted rectangle around it. While there can be any number of selected items, there is always just one focus item. This is important with regards to Keyboard Navigation, since the user must be certain what the next keystroke will do.
To programmatically move the focus to a new item, simply set the FocusItem property to the key that uniquely identifies that item.
Regular Selection
Full Row Selection
This property has an alias: FocusPos. In other words, you can use either the FocusItem or FocusPos properties to get or set the current focus item.
HINT: You can hide the focus rectangle using the ShowFocusItem property.
Example
// Get the current focus item FocusItem = Get_Property(@Window:".OLE_TREE", "OLE.FocusItem") // Move focus to its parent ParentItem = Get_Property(@Window:".OLE_TREE", "OLE.ItemParent[":FocusItem:"]") Set_Property(@Window:".OLE_TREE", "OLE.FocusItem", ParentItem)