Hello all:
wx.version() gives: '2.8.4.2 (gtk2-unicode)'
consider this:
import wx
app = wx.PySimpleApp()
f = wx.Frame(None, -1, "Bug")
szr = wx.BoxSizer(wx.VERTICAL)
spin = wx.SpinCtrl(f, -1, "5", min=1, max=100)
spin.SetValue(10)
btn = wx.Button(f, -1, "CLICK")
def get_val(e):
print "SPIN VALUE:", spin.GetValue()
e.Skip()
btn.Bind(wx.EVT_BUTTON, get_val)
szr.Add(spin)
szr.Add(btn)
f.SetSizer(szr)
f.Show()
app.MainLoop()
Try clicking on the button *before* changing the sping ctrl: the reported
value is 1 and not 10. With wx 2.6.3.3 the value is correctly 10.
Is this a bug or has the API changed?
Alberto
On windows, that works fine. So I presume, it is a bug on gtk.
Though I have to say, I have 2.8.1.1 unicode.
···
On Thu, 06 Sep 2007 16:52:08 +0200, Alberto Griggio <alberto.griggio@gmail.com> wrote:
Hello all:
wx.version() gives: '2.8.4.2 (gtk2-unicode)'
consider this:
import wx
app = wx.PySimpleApp()
f = wx.Frame(None, -1, "Bug")
szr = wx.BoxSizer(wx.VERTICAL)
spin = wx.SpinCtrl(f, -1, "5", min=1, max=100)
spin.SetValue(10)
btn = wx.Button(f, -1, "CLICK")
def get_val(e):
print "SPIN VALUE:", spin.GetValue()
e.Skip()
btn.Bind(wx.EVT_BUTTON, get_val)
szr.Add(spin)
szr.Add(btn)
f.SetSizer(szr)
f.Show()
app.MainLoop()
Try clicking on the button *before* changing the sping ctrl: the reported
value is 1 and not 10. With wx 2.6.3.3 the value is correctly 10.
Is this a bug or has the API changed?
Alberto
--
Franz Steinhaeusler