property Items.FocusItem as Long
Retrieves the index of the item that has the focus.

   Long A long value that indicates the index of the item that has the focus.  

The FocusItem property specifies the index of the focused item. If there is no focused item the FocusItem property retrieves -1. At one moment, only one item can be focused. When the selection is changed the focused item is changed too. Use the SelectCount property to get the number of selected items. Use the SelectedItem property to get the selected item. Use the SelectItem to select or unselect a specified item. If the control supports only single selection, you can use the FocusItem property to get the selected/focused item because they are always the same. Use the ShowFocusRect property to indicate whether the control draws a marking rectangle around the focused item. You can change the focused item, by selecting a new item using the SelectItem method. If the items is not selectable, it is not focusable as well. Use the SelectableItem property to specify whether an item is selectable/focusable.

Send comments on this topic.
1999-2017 Exontrol.COM, Software. All rights reserved.