is there any way to highlight a button compiling to coco using x86.?
Thanks
Hilight button in CoCo
Re: Hilight button in CoCo
In 5.1 you can use the CocoaMessage command to do something like that.
If you want to toggle a button, you can use SetGadgetState().
If you want to toggle a button, you can use SetGadgetState().
Re: Hilight button in CoCo
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_CloseWindowRe: Hilight button in CoCo
I think than #PB_Button_Default flag should work as well.
Re: Hilight button in CoCo
That'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


