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...")
 
 
Line 42: Line 42:
 
<pre>property ButtonHeight: Integer read FBtnHeight write setBtnHeight;</pre>
 
<pre>property ButtonHeight: Integer read FBtnHeight write setBtnHeight;</pre>
  
[[File:TW3Toolbar.ButtonHeight.png]]
+
[[File:TW3Toolbar.ButtonHeight.png|ButtonHeight]]
  
 
<div id="ButtonSpace"></div>
 
<div id="ButtonSpace"></div>
Line 50: Line 50:
 
<pre>property ButtonSpace: Integer read FBtnSpacing write setBtnSpacing;</pre>
 
<pre>property ButtonSpace: Integer read FBtnSpacing write setBtnSpacing;</pre>
  
[[File:TW3Toolbar.ButtonSpace.png]]
+
[[File:TW3Toolbar.ButtonSpace.png|ButtonSpace]]
  
 
<div id="ButtonWidth"></div>
 
<div id="ButtonWidth"></div>
Line 58: Line 58:
 
<pre>property ButtonWidth: Integer read FBtnWidth write setBtnWidth;</pre>
 
<pre>property ButtonWidth: Integer read FBtnWidth write setBtnWidth;</pre>
  
[[File:TW3Toolbar.ButtonWidth.png]]
+
[[File:TW3Toolbar.ButtonWidth.png|ButtonWidth]]
  
 
= Methods =
 
= Methods =

Latest revision as of 13:02, 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;

ButtonHeight

Property-icon.png ButtonSpace

Specifies horizontal distance between buttons on toolbar.

property ButtonSpace: Integer read FBtnSpacing write setBtnSpacing;

ButtonSpace

Property-icon.png ButtonWidth

Specifies horizontal size of each button added to toolbar.

property ButtonWidth: Integer read FBtnWidth write setBtnWidth;

ButtonWidth

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;