Difference between revisions of "TW3Toolbar"

From Smart Mobile Studio
Jump to: navigation, search
(Created page with "__NOTOC__ Represents class for toolbar. Unit: W3Toolbar.pas ; Hierarchy : TObject :: TW3TagObj ::: TW3Component :::: TW3MovableControl ::::: [[TW3CustomContro...")
(No difference)

Revision as of 13:01, 17 July 2014


Represents class for toolbar.


Unit: W3Toolbar.pas


Hierarchy
TObject
TW3TagObj
TW3Component
TW3MovableControl
TW3CustomControl
TW3Toolbar
Properties
Property-icon.png ButtonHeight
Property-icon.png ButtonSpace
Property-icon.png ButtonWidth
Methods
Method-icon.png Add


Usage Typical usage of this control is to first add new items by using Items object Add method. Then it is required to connect items to the event handlers (usually OnClick event).


Properties

Property-icon.png ButtonHeight

Specifies vertical size of each button added to toolbar.

property ButtonHeight: Integer read FBtnHeight write setBtnHeight;

TW3Toolbar.ButtonHeight.png

Property-icon.png ButtonSpace

Specifies horizontal distance between buttons on toolbar.

property ButtonSpace: Integer read FBtnSpacing write setBtnSpacing;

TW3Toolbar.ButtonSpace.png

Property-icon.png ButtonWidth

Specifies horizontal size of each button added to toolbar.

property ButtonWidth: Integer read FBtnWidth write setBtnWidth;

TW3Toolbar.ButtonWidth.png

Methods

Method-icon.png Add

Create new button child object.

function add: TW3ToolbarButton;

Example:

W3Toolbar1.add.Caption := 'Back';

Example 2:

var
  MyButton: TW3ToolbarButton;
begin
  MyButton := W3Toolbar1.add;
  MyButton.Caption := 'Back';
  MyButton.Glyph.LoadFromURL('res/my_image.jpg');
end;