Hello Michele,
Then I try to change the selected value into my combo, on win it "print"
the right value, on linux, it print the preceding value. It's a bug?
I don't know if it is a bug or not, I only have Windows machines, but I
would suggest you to always place wxControls into a Panel, instead directly
on a Frame. Usually this would help also for other wxProblems.
Something like:
mport wx
class FramePrev(wx.Frame):
def __init__(self, parent):
wx.Frame.__init__(self, parent)
panel = wx.Panel(self, -1)
self.c1 = wx.ComboBox(panel, pos=wx.Point(10,10))
self.c1.Bind(wx.EVT_COMBOBOX, self.oncombo1)
self.c1.Append('test1')
self.c1.Append('test2')
self.c1.Append('test3')
def oncombo1(self, event):
print self.c1.GetValue()
class MyApp(wx.App):
def OnInit(self):
self.main = FramePrev(None)
self.main.Show()
return True
if __name__ == '__main__':
app = MyApp(0)
app.MainLoop()
Andrea.