[wxPython] Help with wxChoice!
SNYDER, BARRON F. (AIT)
bs1535 at sbc.com
Wed Jun 13 11:16:33 EDT 2001
Thanks for you reply!
Actually I just wanted to be sure that I was using the correct syntax. Since
the wxWindows docs are geared towards C programming, I wasn't sure if the
dot notation I am using is correct.
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.
class ABCForm(wxMDIChildFrame):
def __init__(self, parent, id, title = "ABC Form",
pos = wxPyDefaultPosition,
size = wxPyDefaultSize,
style = wxDEFAULT_FRAME_STYLE):
wxMDIChildFrame.__init__(self, parent, id, title, pos, size, style)
ABCFormGUI( self, true )
val = self.GetOriginatorSalescode()
val.Append("ABC123")
def GetOriginatorSalescode(self):
return wxPyTypeCast( self.FindWindowById(ID_ORIGINATOR_SALESCODE),
"wxChoice" )
-----Original Message-----
From: David Bolen [mailto:db3l at fitlinxx.com]
Sent: Tuesday, June 12, 2001 6:19 PM
To: python-list at python.org
Subject: Re: [wxPython] Help with wxChoice!
"SNYDER, BARRON F. (AIT)" <bs1535 at sbc.com> writes:
> That is what I'm doing and I don't get an error but the new value isn't
> being appended either.
>
> Any help is appreciated!
Could you perhaps post a snippet of the actual code being used and
what version of wxPython you are using? I just tried 'Append'ing to a
choice control on my system and it seems to be working fine (wxPython
2.2.1 with either Python 1.5.2 or 2.0)
--
-- 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