Hilight button in CoCo
Posted: Tue Jan 22, 2013 6:57 am
is there any way to highlight a button compiling to coco using x86.?
Thanks
Thanks
http://www.purebasic.com
https://www.purebasic.fr/english/
For PB 5.10 (x86 or x64):spacebuddy wrote:is there any way to highlight a button compiling to coco using x86.?
Code: Select all
Procedure HighlightButton(WindowID, GadgetID)
CocoaMessage(0, WindowID(WindowID), "setDefaultButtonCell:", CocoaMessage(0, GadgetID(GadgetID), "cell"))
EndProcedure
OpenWindow(0, 270, 100, 200, 95, "ButtonGadgets")
ButtonGadget(0, 20, 20, 160, 25, "Standard Button")
ButtonGadget(1, 20, 55, 160, 25, "Highlighted Button")
HighlightButton(0, 1)
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindowThat's right and it doesn't require API at all. Sorry that I overlooked this...Fred wrote:I think than #PB_Button_Default flag should work as well.
Code: Select all
OpenWindow(0, 270, 100, 200, 95, "ButtonGadgets")
ButtonGadget(0, 20, 20, 160, 25, "Standard Button")
ButtonGadget(1, 20, 55, 160, 25, "Highlighted Button", #PB_Button_Default)
Repeat
Until WaitWindowEvent() = #PB_Event_CloseWindow