SpinCtrl and forward tab-cycle

mawe mawe at typeofundefined.com
Tue Jan 1 17:11:29 PST 2008


Hello there list,

I noticed that it's not possible to tab-cycle forward when using the code below. It however works fine in the wxPython demos when I add some more widgets to it.

What's wrong with the code below?

Regards,
Matthias

Code:

import wx

class TestFrame(wx.Frame):
    def __init__(self, parent, ID, title, style):
        wx.Frame.__init__(self, parent, ID, title, size=(300, 250), style=style)

        self.box = wx.BoxSizer(wx.VERTICAL)

        self.TelephoneText = wx.TextCtrl(self, -1, "", size=(200, -1))
        self.NumberPackagesText = wx.SpinCtrl(self, -1)
        self.TelephoneText11 = wx.TextCtrl(self, -1, "Blablabla", size=(150, -1))
        self.DeliveryDateText = wx.DatePickerCtrl(self, size=(100,-1),style=wx.DP_DROPDOWN | wx.DP_SHOWCENTURY)

        self.box.Add(self.TelephoneText)
        self.box.Add(self.NumberPackagesText)
        self.box.Add(self.TelephoneText11)
        self.box.Add(self.DeliveryDateText)

        self.SetAutoLayout(True)
        self.SetSizer(self.box)
        self.Layout()

app = wx.PySimpleApp()
frame = TestFrame(None, -1, "Test app", wx.MINIMIZE_BOX | wx.SYSTEM_MENU | wx.CAPTION | wx.CLOSE_BOX | wx.CLIP_CHILDREN | wx.TAB_TRAVERSAL)
frame.Show()
app.MainLoop()




More information about the wxpython-users mailing list