ButtonImageGadget with #PB_Button_Toggle

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Sven
User
User
Posts: 20
Joined: Sat Mar 11, 2006 6:46 pm

ButtonImageGadget with #PB_Button_Toggle

Post by Sven »

Sorry if this was ask before: Is it possible to have a #PB_Button_Toggle-Flag with ButtonImageGadget()?

Code: Select all

Flags = #PB_Button_Toggle
ButtonImageGadget(#Gadget, x, y, Width, Height, ImageID[, Flags])
To update the Image, I would suggest a function

Code: Select all

SetGadgetImage(#Gadget, ImageID())
GetGadgetImage(#Gadget)
so one can get and set the button state with

Code: Select all

SetGadgetState(#Gadget, State)
GetGadgetState(#Gadget) 
and ButtonImageGadget acts like ButtonGadget.

Sven


[/code]