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