Hi,
I use 2.5.3.1 and have a problem with the following code. I don't know if I'm missing something, but the combobox doesn't emit an event in the following context:
- select an entry in the combobox
- clear and refill with different values the comboxbox in the event callback.
- select an entry in the combobox with the same index as before.
Note: It's strange, I've not been able to reproduce the problem by putting the combobox directly in the frame...
Thx and regards,
Nicolas
import wx
class TestComboBox(wx.Panel):
def __init__(self, parent):
wx.Panel.__init__(self, parent, -1)
cb = wx.ComboBox(self, 500, pos=(90, 50), size=(210, -1),
choices=['one'])
def callback(event):
print 'Event Callback ---> %s\n' % event.GetString()
cb.Clear()
cb.Append('1') # No event when selecting it
self.Bind(wx.EVT_COMBOBOX, callback, cb)
class Frame(wx.Frame):
def __init__(self, parent=None, id=-1, title="ComboBox Test"):
wx.Frame.__init__(self, None, -1, "ComboBox Test",
size=(350,150))
self.panel = TestComboBox(self)
class MyApp(wx.App):
def OnInit(self):
self.frame = Frame()
self.frame.Show(True)
self.SetTopWindow(self.frame)
return True
app = MyApp(False)
app.MainLoop()
Hello,
wxGTK or wxMSW?
(I have 2.5.4.1 and WinXp).
It seems ok on my machine.
Hi,
I use 2.5.3.1 and have a problem with the following code. I don't know
if I'm missing something, but the combobox doesn't emit an event in the
following context:
- select an entry in the combobox
got: Event Callback ---> one
- clear and refill with different values the comboxbox in the event
callback.
- select an entry in the combobox with the same index as before.
got: Event Callback ---> 1
···
On Tue, 22 Mar 2005 10:43:44 -0500, Nicolas Fleury <nidoizo@yahoo.com> wrote:
Note: It's strange, I've not been able to reproduce the problem by
putting the combobox directly in the frame.
--
Franz Steinhaeusler
Ah, yes, I saw; this happened in 2.5.3.1 as you described.
If you update to 2.5.4.1, it should be solved.
···
On Tue, 22 Mar 2005 16:59:10 +0100, Franz Steinhäusler <franz.steinhaeusler@gmx.at> wrote:
On Tue, 22 Mar 2005 10:43:44 -0500, Nicolas Fleury <nidoizo@yahoo.com> >wrote:
Hello,
wxGTK or wxMSW?
(I have 2.5.4.1 and WinXp).
It seems ok on my machine.
Hi,
I use 2.5.3.1 and have a problem with the following code. I don't know
if I'm missing something, but the combobox doesn't emit an event in the
following context:
- select an entry in the combobox
got: Event Callback ---> one
- clear and refill with different values the comboxbox in the event
callback.
- select an entry in the combobox with the same index as before.
got: Event Callback ---> 1
Note: It's strange, I've not been able to reproduce the problem by
putting the combobox directly in the frame.
--
Franz Steinhaeusler
Franz Steinhäusler wrote:
Ah, yes, I saw; this happened in 2.5.3.1 as you described.
If you update to 2.5.4.1, it should be solved.
--
Franz Steinhaeusler
Thx, I just noticed the release of 2.5.4.1.
Regards,
Nicolas