ButtonImageGadget() + #PB_Button_Toggle
Posted: Tue Oct 04, 2005 6:56 pm
Code updated For 5.20+
If you want a ButtonImageGadget() with the 'Toogle' property, do like this:
If you want a ButtonImageGadget() with the 'Toogle' property, do like this:
Code: Select all
If OpenWindow(0,0,0,240,200,"A toggle ButtonImageGadget",#PB_Window_SystemMenu|#PB_Window_ScreenCentered)
CreateImage(0, 50, 50)
ButtonGadget(0, 10, 10, 50, 50, "", #PB_Button_Toggle| #BS_BITMAP)
SendMessage_(GadgetID(0), #BM_SETIMAGE, #IMAGE_BITMAP, ImageID(0))
Repeat : Until WaitWindowEvent()=#PB_Event_CloseWindow
EndIf