[Tutor] WXPython Listbox Problem

Toon Pieton pytutmail at gmail.com
Wed Dec 6 17:21:38 CET 2006


Hey friendly users!

I'm trying to make a simple program to calculate the odds when playing
poker. The idea is that you select both your cards from listboxes. However,
no matter what I try, I just can't select a entry in either of the
listboxes! I can click all I want, it just won't select. Here's the code
which I use to create the boxes:

ID_BOX1 = 120
ID_BOX2 = 130
...
        #Boxes, to select cards
        self.box1 = wx.ListBox(parent=self, id=ID_BOX1, size=(60,163) ,
name='Card 1',

choices=['Ace','King','Queen','Ten','9','8','7','6','5','4','3','2'],style=0)
        self.box2 = wx.ListBox(parent=self, id=ID_BOX2, size=(60,163) ,
name='Card 2',

choices=['Ace','King','Queen','Ten','9','8','7','6','5','4','3','2'],style=0)
        self.box1.Bind(wx.EVT_LISTBOX, self.b1func,id=ID_BOX1)
        self.box2.Bind(wx.EVT_LISTBOX, self.b2func,id=ID_BOX2)

I hope anybody can help me. If you need to see the full code, just send me a
reply

Thanks in advance to anybody reading/helping!
Toon Pieton
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20061206/f229c17a/attachment.html 


More information about the Tutor mailing list