EVT_LISTBOX broken on OSX?
7stud
bbxx789_05ss at yahoo.com
Mon Aug 13 02:49:22 PDT 2007
Hi,
On an imac with os 10.4.7, the EVT_LISTBOX event doesn't fire if I click on
an item that is already selected:
import wx
class MyFrame(wx.Frame):
def __init__(self):
wx.Frame.__init__(self, None, -1, "List Boxes")
panel = wx.Panel(self, -1)
choices1 = ["red", "green", "blue"]
self.listbox = wx.ListBox(panel, -1, (10, 10), (100, 200),
choices1, wx.LB_SINGLE)
self.listbox.Bind(wx.EVT_LISTBOX, self.on_select)
def on_select(self, event):
selection = self.listbox.GetSelection()
print selection
app = wx.PySimpleApp(redirect=False)
win = MyFrame()
win.Show()
app.MainLoop()
More information about the wxpython-users
mailing list