TW3HeaderControl

From Smart Mobile Studio
Jump to: navigation, search


Represents class for header control (panel) containing 2 buttons (TW3ToolButton).

This two buttons can be accessed via BackButton and NextButton properties.


Unit: W3Header.pas


Hierarchy
TObject
TW3TagObj
TW3Component
TW3MovableControl
TW3CustomControl
TW3HeaderControl
Properties
Property-icon.png BackButton
Property-icon.png NextButton
Property-icon.png Title


Properties

Property-icon.png BackButton

Identify back button on header. This button is visible by default and it have caption set to “Back”.

property BackButton: TW3ToolButton read FBackBtn;

In order to detect mouse clicks on this button, OnClick event of TW3ToolButton can be implemented.

...

protected
  { My event handlers }
  procedure MyBackButtonClick(Sender: TObject);

...

procedure TForm1.InitializeForm;
begin
  inherited;
  // this is a good place to initialize components

  // Maybe we want to customize our button. We can do it here.
  W3HeaderControl1.BackButton.Caption := 'Previous';

  // Connect event to our custom handler.
  W3HeaderControl1.BackButton.OnClick := MyBackButtonClick;
end;


Property-icon.png NextButton

Identify “Next” button on header. This button is positioned on right side and it is not visible by default.

property NextButton: TW3ToolButton read FNextBtn;

In order to make “Next” button visible write:

W3HeaderControl1.NextButton.Visible := True;

In order to detect mouse clicks on this button, OnClick event of TW3ToolButton can be implemented.


See also: BackButton


Property-icon.png Title

Specifies Header’s title. Component responsible for displaying Title is of TW3Label type.

property Title: TW3Label read FLabel;

Example:

W3HeaderControl.Title.Caption := 'Settings';