On Sun, Jun 28, 2009 at 5:55 AM, Attila<ejjeliorja...@gmail.com> wrote: > Hello! > I have a problem with the checkboxes. I am using > wx.wxEVT_COMMAND_CHECKBOX_CLICKED event handler, to disable some other > control. It works fine, when I click on the control. But I set the > checkbox values by wxCheckBox:SetValue(true/false). This doesn't call the > event, so I tried with
wxWidgets controls normally do not sent event for programmed changed, only from user interaction. I often make a separate function to handle changes so that I can call it both from the event handler or after I've changed the value programmatically. >myApp:ProcessEvent(wx.wxCommandEvent(wx.wxEVT_COMMAND_CHECKBOX_CLICKED,xmlResource:GetXRCID(checkbox))) > which calls the event, but there I use 'if event:IsChecked() then' > conditions, which is always false, because the event is 'fake', not a real > click. Can I set up the IsChecked field of the event, local e = wx.wxCommandEvent(wx.wxEVT_COMMAND_CHECKBOX_CLICKED,xmlResource:GetXRCID(checkbox)) e:SetInt(1) myApp:ProcessEvent(e) Note: IsChecked() returns GetInt() != 0 > or is there any call which generates an event too? No. Regards, John ------------------------------------------------------------------------------ _______________________________________________ wxlua-users mailing list wxlua-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxlua-users