The joystick example uses wx.EVT_SIZE, wx.wxEVT_PAINT and wx.wxEVT_TIMER. It seems radio buttons events or mouse events seemed to be blocked.
I posted my code on page 7 of this discussion....I don't see where I have gone wrong.
The radio buttons move but I do not catch/detect the radio button events
panel:Connect(RADIOBTN1_ID, wx.wxEVT_COMMAND_RADIOBUTTON_SELECTED,
function(event)
local Selected = rbtns1:GetValue();
if Selected then
frame:SetStatusText("MPG OFF");
MPGSwitchPosition = 1;
local dc = wx.wxPaintDC(BitMapPanel1);
dc:DrawBitmap (MPGSwitchBMPs[MPGSwitchPosition], 0,0, true);
dc:delete ();
panel:Refresh();
end