Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TcxCustomNavigatorButtons.GetButtonEnabled(Integer) Method

Specifies the conditions for enabling or disabling navigator buttons.

#Declaration

Delphi
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