SetTBimage | |||||||||
Syntax: | |||||||||
SetTBimage( hImage , hMask , #TYPE_of_TB-Image ) | |||||||||
Parameters: | |||||||||
| |||||||||
Return Values: | |||||||||
| |||||||||
Description: | |||||||||
With this command you set the Button-Images and the Button-Masks for the Toolbar-Buttons. You can set the Images for NORMAL Toolbar-Buttons, for the Highlighted State (MouseOver) and for the DISABLED State. | |||||||||
Example: | |||||||||
OpenWindow(... CreateTB(... Image1 = LoadImage(1,"TB.BMP") ; Load the Buttons Image2 = LoadImage(2,"TBMASK.BMP") ; Load the Mask ; (for Transparency) Image3 = LoadImage(3,"HOT.BMP") ; Load the Hotspot Image Image4 = LoadImage(4,"DISABLED.BMP") ; Image for Disabled Buttons SetTBimage(Image1,Image2,#TBpro_NORMAL) SetTBimage(Image3,Image2,#TBpro_Hot) SetTBimage(Image4,Image2,#TBpro_Disabled) OpenWindow(... CreateTB(... SetTBimage(0,0,#TBpro_NORMAL) ; Dont want to use SetTBimage(0,0,#TBpro_Hot) ; external Images, so SetTBimage(0,0,#TBpro_Disabled) ; set all to NULL and AddTBsysIcons() | |||||||||
Remarks: | |||||||||
You have to set the Images right after the Toolbar is created !! #TBpro_NORMAL must be set, others are optional. #TBpro_HOT works only in combination with FlatStyle TBīs (#TBpro_FLAT) If you set Images for #TBpro_DISABLED, this images are shown when the Button is disabled. If you dont set #TBpro_DISABLED, the Button is grayed in disabled state. If you dont specify a MASK (you set it to 0 (NULL)), the Button- Images are not transparent. | |||||||||
|