I got a wxPython combobox which contains a list of sections of my .ini file. I add new section while my program is running. And I also want to see the NEW entries in my combobox.
How can I refresh / update it?
My code :
self.cbxCfgProfiles = wx.ComboBox(self, pos=(170, 120), size=(440, -1),
choices=getCfgProfileList(), style=wx.CB_DROPDOWN)
When I restart my program I see the new entries.
I try already self.cbxCfgProfiles.Refresh() in my method. It does not work. :(
If you have a new list of strings that you want to set the combobox to, the SetItems() method is probably the easiest way. It clears the control and then adds all the new selections.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With