SetTBbuttonImage

Syntax:

SetTBbuttonImage( #ButtonID, Image )

Parameters:

#ButtonID

=

your ButtonNumber (ID)

Image

=

The number of the image from your image-list

(starting with 1) or one of the System Icons.

See Remarks.


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
    SetTBbuttonImage(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 ChangeTBbuttonImage()


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:

#TBpro_CUT#TBpro_COPY#TBpro_PASTE #TBpro_UNDO#TBpro_REDO #TBpro_FILENEW#TBpro_FILEOPEN#TBpro_FILESAVE #TBpro_DELETE#TBpro_HELP #TBpro_FIND#TBpro_REPLACE #TBpro_PRINT#TBpro_PRINTPREVIEW
#TBpro_PROPERTIES#TBpro_FAVORITES#TBpro_ADDTOFAVORITES #TBpro_BACK#TBpro_FORWARD #TBpro_VIEWTREE#TBpro_LARGEICONS#TBpro_SMALLICONS#TBpro_LISTICONS#TBpro_DETAILICONS #TBpro_SORTNAME#TBpro_SORTSIZE#TBpro_SORTDATE#TBpro_SORTTYPE #TBpro_PARENTFOLDER#TBpro_NEWFOLDER
#TBpro_NETCONNECT#TBpro_NETDISCONNECT




Supported OS:   Windows