ChangeTBbuttonImage | ||||||
Syntax: | ||||||
ChangeTBbuttonImage( #ButtonID, Image ) | ||||||
Parameters: | ||||||
| ||||||
Description: | ||||||
Set a new Image for a ToolbarButton. Want to make animated Toolbar Buttons ?? | ||||||
Example: | ||||||
AddTBbutton(600,1,#TBpro_BUTTON) Procedure AnimateButton() ; Little procedure to animate a Toolbar button ; The Button Images go from 1 to 4 and start ; again at 1 (small 4-picture-anim) Shared CurrentButtonPicture CurrentButtonPicture + 1 ChangeTBbuttonImage(600,CurrentButtonPicture) If CurrentButtonPicture = 4: CurrentButtonPicture = 0: EndIf EndProcedure ; Start a Timer for the Anim ; 4 pictures pro second = 250 milliseconds StartTimer(1,250,@AnimateButton()) | ||||||
Remarks: | ||||||
This is the same as the command SetTBbuttonImage() 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: | ||||||
| ||||||
|