[wxPython] Help with wxChoice!

David Bolen db3l at fitlinxx.com
Wed Jun 13 15:31:03 EDT 2001


"SNYDER, BARRON F. (AIT)" <bs1535 at sbc.com> writes:

> But since you ask <g>, I'm actually trying to append to a wxChoice control
> that was laid out using wxDesigner. Since the widget code is automatically
> generated from wxDesigner, I have to get the handle of the specific widget I
> want by using wxPyTypeCast.

Hmm, I just tried that as well (not with wxDesigner, but using
FindWindowById on my own created wxChoice window) and it's working for
me, so at first glance I would think that the code you're using ought
to work.  You didn't mention which wxPython release you're using - I
suppose it could be a bug somewhere.  Or could there be anything in
the auto-generated code by wxDesigner that is perhaps clearly out the
choice box at some point in time after you add the information?

You might adding some debugging print's or something just after you
append to the choice, using something like the FindString or GetString
methods to try to determine if the choice thinks the new information
has been added at that point in time.  If so, then it would be an
indication that something later on during processing (which could
still be before the control is actually displayed to the screen) is
removing information.

You might also try directing this to the wxPython mailing list
(wxpython-users at lists.wxwindows.org) and see if anyone there has any
other suggestions.

--
-- David
-- 
/-----------------------------------------------------------------------\
 \               David Bolen            \   E-mail: db3l at fitlinxx.com  /
  |             FitLinxx, Inc.            \  Phone: (203) 708-5192    |
 /  860 Canal Street, Stamford, CT  06902   \  Fax: (203) 316-5150     \
\-----------------------------------------------------------------------/



More information about the Python-list mailing list