Run-time modification of wxRadioBox

Hi,

Is it possible to add/remove choices in a wxRadioBox at run time?

Thanks,

Jens

Jens Rantil wrote:

Hi,

Is it possible to add/remove choices in a wxRadioBox at run time?

No you'll need to recreate the radiobox (and Destroy() the old one.) To make this appear to be a smooth process at runtime you can do something like this pseudocode:

1. freeze the parent
2. create new radiobox
3. insert into sizer at the same position as the old radiobox
4. destroy the old radiobox
5. call parent.Layout()
6. thaw the parent

ยทยทยท

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!