AddTBbutton | |||||||||
Syntax: | |||||||||
AddTBbutton( #ButtonID, #Image, Type ) | |||||||||
Parameters: | |||||||||
| |||||||||
Return Values: | |||||||||
| |||||||||
Description: | |||||||||
Add a Button to your Toolbar. | |||||||||
Example: | |||||||||
;BtnID| Image | Type ;---------------------- AddTBbutton(500,1,#TBpro_BUTTON) ; 500 | 1 | Btn AddTBbutton(501,2,#TBpro_BUTTON) ; 501 | 2 | Btn AddTBseparator() ; | | SEP AddTBbutton(502, #TBpro_CUT,#TBpro_CheckBUTTON); 502 |Sys:Cut | Check AddTBbutton(503, #TBpro_COPY,#TBpro_CheckBUTTON); 503 |Sys:Copy | Check AddTBbutton(504,#TBpro_PASTE,#TBpro_CheckBUTTON); 504 |Sys:Paste| Check AddTBseparator() ; | | SEP AddTBbutton(505,3,#TBpro_PushButton) ; 505 | 3 | Push AddTBbutton(506,4,#TBpro_PushButton) ; 506 | 4 | Push | |||||||||
Remarks: | |||||||||
Button Types explained: #TBpro_Button Standard Button you can see in every Toolbar. Simply press this button. #TBpro_PushButton This is a Button that toggles its state when you press it. One click to ´mark´ it, another click to ´unmark´ it. #TBpro_CheckButton Like a PushButton, but used in a group. Only 1 Button of the Group can be pressed at one time. Its like a group of "RadioButtons". Place a few of this Buttons beside each other and if you dont want to add more Buttons to this Group, just use another Style for the next Button or end the group with a Separator. #TBpro_DropdownButton Button with a little arrow on the right side. The Button is splitted into 2 parts: A ´normal part´ that acts like a standard button, and the right part that displays the little arrow. The ´normal part´ of the Button acts like a standard button, but when you press the little arrow, the Toolbar sends a #TBN_DROPDOWN notification to the main-window. If you get this message you can display a popup-menu with options etc.. #TBpro_WholeDropdownButton Same like #TBpro_DropdownButton, but this time the WHOLE Button sends the #TBN_DROPDOWN notification and this Button is not splitted into 2 pieces. Image Numbers: For the Image Number, you can use an Index from the ImageList you added to the Toolbar with the command SetTBimage(). The ImageNumbers start at 1 and go up to the last image on your Button-Picture. When your Toolbar Image-Size is 16x16 or 24x24, you can use System Icons instead of images. Before you can use SystemIcons you have to call AddTBsysIcons() after setting your button pictures. If you have done all this setup carefully, you can use the following constants for the image number: (MOVE MOUSE CURSOR OVER THE IMAGES TO SEE THE #CONSTANT) | |||||||||
Image: | |||||||||
| |||||||||
|