toggle button in a toolbar of MAXGUI

BlitzMax Forums/BlitzMax Programming/toggle button in a toolbar of MAXGUI

Mathieu A(Posted 2006) [#1]
How can we know when a toggle button in a toolbar is down?

And I talk about a Toggle button NOT a normal button. A toggle has two position position (UP or Down)

I want to know at any moment when a button is down
Thxs


tonyg(Posted 2006) [#2]
How is the button defined?
Can you supply example code?


Mathieu A(Posted 2006) [#3]
i declare my toolbar like this:

Const TOOLBAR_TERRITORY = 4

Local MyToolBar:TGadget=CreateToolBar("MEDIAS\icons.PNG", 0,0,60,20,MyWindow)
ModifyGadgetItem( MyToolBar,TOOLBAR_TERRITORY,"territoire",GADGETITEM_TOGGLE, 4)
DisableGadgetItem MyToolbar,TOOLBAR_TERRITORY

As you can see my button TOOLBAR_TERRITORY (the 4th) is a TOGGLE button.

I know how to use normal button, but I don't how to have the information about toggle button. Particulary when it is push or released. So I'd like to know if it is possible to have this information.

Thanks


assari(Posted 2006) [#4]
I could not figure this one out either. In my tutorial, I used a variable to track the state of the toggle button.


Mathieu A(Posted 2006) [#5]
Ok, so the solution is to use a variable global to know if the button is Push or not....thanks


Mathieu A(Posted 2006) [#6]
When I click on the Toggle button, the icon of the button isn't display. How can I configure the icon when the button is push?

Thanks