AddButton |
Adds a toolbar button to a band
Prototype:
AddButton(LONG BandID, LONG ID, STRING Caption, <STRING IconName>, ULONG Flags=0, <LONG InsertAfterID>)
Arguments:
BandID |
ID of the band the control should be added to |
ID |
The unique ID of this control |
Caption |
The text for this control |
IconName |
Optional. Icon name |
Flags |
Optional. button style flags. Can be one or more of the following flags: PTB:BTN_CHECK This is a checkbox button PTB:BTN_RADIO Radiobutton PTB:BTN_DISABLED Control is initially disabled PTB:BTN_CHECKED Control is initially checked PTB:BTN_HIDE Control is hidden PTB:BTN_READONLY Control is read only |
InsertAfterID |
Optional. Control should be inserted after the control with InsertAfterID. If you specify 0 as InsertAfterID, the control will be inserted first in band. |
See also:
AddBand, AddCombo, AddDropButton, AddEntry, AddMenu, AddSpacer, AddText
Example:
Toolbar1.AddButton(TB_SomeBand, ID_MyButton, 'Hello World!')
Toolbar1.AddButton(TB_SomeBand, 10001, 'Hello World!', 'MyIcon.ico', PTB:BTN_CHECK+PTB:BTN_CHECKED)