TcxNavigatorControlButtons Class
The collection of buttons used in non-db navigator controls.
Declaration
TcxNavigatorControlButtons = class(
TcxCustomNavigatorButtons
)
Remarks
In contrast to db-oriented buttons, TcxNavigatorControlButtons works directly with a control and this needs to implement the IcxNavigator interface. Procedures of this interface provide all the necessary default actions.
The following table displays default indexes and hints for buttons contained in the collection, and describes functionality provided by them.
Button Name | Default Index | Default Hint | Description |
---|---|---|---|
NBDI_FIRST | Moves the cursor to the first record. | ||
NBDI_PRIORPAGE | Moves the cursor to the previous page. | ||
NBDI_PRIOR | Moves the cursor to the previous record. | ||
NBDI_NEXT | Moves the cursor to the next record. | ||
NBDI_NEXTPAGE | Moves the cursor to the next page. | ||
NBDI_LAST | Moves the cursor to the last record. | ||
NBDI_INSERT | Inserts a new record. | ||
NBDI_APPEND | Appends a new record. | ||
NBDI_DELETE | Deletes the current record. | ||
NBDI_EDIT | Sets the dataset to the edit state. | ||
NBDI_POST | Writes the modified record. | ||
NBDI_CANCEL | Cancels modifications to the active record. | ||
NBDI_REFRESH | Updates the data view in the appropriate control. | ||
NBDI_SAVEBOOKMARK | Saves a certain bookmark. | ||
NBDI_GOTOBOOKMARK | Moves the cursor to the previously saved bookmark. | ||
NBDI_FILTER | Invokes the Filter Builder dialog. | ||
Any custom button | The default index is assigned automatically, starting from NavigatorButtonCount. | Empty string. You can specify a hint text via a button’s Hint property. | No predefined action. As with default buttons, you can handle a button collection’s OnButtonClick event to perform any actions associated with custom buttons. |
You can modify the button behavior as required using any of the following methods:
Handle a button collection’s OnButtonClick event;
Inherit from TcxNavigatorControlButtons and override the DoButtonClick method.
To dynamically change the accessibility of buttons, override the GetButtonEnabled method or switch a button’s Enabled property.
For more information on how to customize button settings, refer to the TcxNavigatorButton and TcxNavigatorCustomButton class descriptions.
The TcxGridViewNavigatorButtons and TcxExtEditingControlNavigatorButtons classes inherit from TcxNavigatorControlButtons to contain button settings within Grid View navigators and editing controls with option sets.