Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

wxPython Check and Uncheck checkbox

Is it possible to check/uncheck a check box in wxPython? For example:

my_checkbox = wx.CheckBox(my_sizer, wx.ID_ANY, _("My Check Box"))
self.bind(EVT_BUTTON, my_button_func, my_button)
def my_button_func(self, event):
    mycheckbox.Check()

Or something of the sort where I could check/uncheck the box at will.

like image 219
pianist1119 Avatar asked Apr 19 '26 20:04

pianist1119


1 Answers

"The toggle state of a wx.CheckBox can be retrived and set with the methods GetValue() and SetValue() and it's Boolean." _ Robin Dunn: wxPython in Action _

like image 157
martburg Avatar answered Apr 23 '26 19:04

martburg



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!