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.CreateButtons Method

In This Article

Creates a collection of default buttons for a navigator control.

#Declaration

Delphi
procedure CreateButtons; virtual;

#Remarks

This method creates default buttons within the Buttons collection and assigns their default indexes as specified in the TcxCustomNavigatorButtons class description. After default buttons are created, you can customize their settings: visibility, accessibility, hint, and image.

The CreateButtons method can be overridden in TcxCustomNavigatorButtons descendants in order to customize default buttons. For instance, it is possible to create a subset of default buttons with predefined property values. The following sample code creates a collection of disabled buttons.

procedure CreateButtons;
var
  I: Integer;
  FButtons: TcxCustomNavigatorButtons;
begin
  for I := 0 to NavigatorButtonCount - 1 do
  begin
    FButtons[I] := TcxNavigatorButton.Create(Self);
    FButtons[I].DefaultIndex := I;
    FButtons[I].Enabled := False;
  end;
end;
See Also