Radio submenu hotkeys on MorphOS
Posted: Tue Nov 20, 2018 4:58 pm
When I make a submenu with radio items on MorphOS, it doesn't seem to work as radio menu should when I use it by keyboard hotkeys. It's most likely MorphOS problem only, because I couldn't reproduce it quickly on AmigaOS/Win/Mac.
So, in this example test1 and test2 items do work fine with both mouse and hotkeys. test3 and test4 items do also work fine with mouse, but if I use hotkeys to select them, they both stay selected and the other doesn't get deselected as it's supposed to do automatically with radio items.
So, in this example test1 and test2 items do work fine with both mouse and hotkeys. test3 and test4 items do also work fine with mouse, but if I use hotkeys to select them, they both stay selected and the other doesn't get deselected as it's supposed to do automatically with radio items.
Code: Select all
@MENU 1, {
{"First menu", {
{"test1", ID = "test1", Hotkey = "1", Flags = #MENUITEM_RADIO},
{"test2", ID = "test2", Hotkey = "2", Flags = #MENUITEM_RADIO},
{"Submenu", {
{"test3", ID = "test3", Hotkey = "3", Flags = #MENUITEM_RADIO},
{"test4", ID = "test4", Hotkey = "4", Flags = #MENUITEM_RADIO}}}}}
}
@DISPLAY {Menu = 1}
NPrint("Try to change 3 and 4 with hotkeys, and then look how they are set.")
InstallEventHandler({OnMenuSelect=Function(msg) NPrint(msg.Action, msg.Item) EndFunction})
Repeat
WaitEvent
Forever