Skip to main content

TdxBarWindowItem.SetFocus(Boolean) Method

Focuses an item control associated with the current windowed item.

Declaration

procedure SetFocus(ACheckBarControlVisibility: Boolean = False); virtual;

Parameters

Name Type
ACheckBarControlVisibility Boolean

Remarks

An item can have several item controls that can be accessed via the Links collection. The SetFocus method focuses the item control that corresponds to the first item link within the item links collection of the current windowed item. The toolbar (that owns it) is focused as well.

The item control that corresponds to the current item is not focused when the ACheckBarControlVisibility parameter is set to False, and the toolbar to which the item control belongs is not visible.

To access the focused item control, use the FocusedItemLink property.

Note

The SetFocus method may fail when focusing an item that is positioned on a control other than a toolbar (such as a submenu). So, we recommend that you do not call this method in these situations.

See Also