[wxPython-users] 2 questions in wxpython
David Woods
dwoods at wcer.wisc.edu
Tue Dec 4 08:56:38 PST 2007
> if(self.combo1.GetValue ==True):
> print "%s" % self.combo1.GetValue()
Here, you're testing for the existence of a method. You left out the
parentheses which get the result of the method call. And if you'd included
the parentheses, you'd be comparing a string result with a Boolean.
I think:
if(self.combo1.GetValue() != ''):
print "%s" % self.combo1.GetValue()
might work better. You might also look at GetSelection() which returns the
integer for your selection, if I remember correctly.
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.wxwidgets.org/pipermail/wxpython-users/attachments/20071204/ae02fb34/attachment.htm
More information about the wxpython-users
mailing list