Skip to main content

TcxCustomNavigatorButtons.GetButtonEnabled(Integer) Method

Specifies the conditions for enabling or disabling navigator buttons.

Declaration

function GetButtonEnabled(ADefaultIndex: Integer): Boolean; virtual;

Parameters

Name Type
ADefaultIndex Integer

Returns

Type
Boolean

Remarks

A navigator control is always connected to a data source (bound or unbound). Its buttons should reflect the current state of the cursor within the data source. For instance, if a cursor reaches the first record, the First, Prior, and PriorPage buttons must be disabled as a user cannot use them. Such a condition must be set in the GetButtonEnabled method. As conditions must be set for all buttons, the ADefaultIndex parameter specifies the button index within the collection of navigator buttons.

The TcxCustomNavigatorButtons class is the base class and its GetButtonEnabled method always returns True. To learn how this method is overridden in TcxCustomNavigatorButtons descendants, refer to the corresponding topics.

See Also