[wxPython-users] RE: SpinCtrl and forward tab-cycle
Mike Driscoll
mdriscoll at co.marshall.ia.us
Thu Jan 3 06:11:35 PST 2008
Matthias
> -----Original Message-----
> From: mawe [mailto:mawe at typeofundefined.com]
> Sent: Wednesday, January 02, 2008 3:32 PM
> To: wxPython-users at lists.wxwidgets.org
> Subject: Re: [wxPython-users] RE: SpinCtrl and forward tab-cycle
>
> Mike, thanks for the reply.
>
> You're right, it's just that the demo is using a Panel
> instead of a BoxSizer.
>
> Strange enough that it works if I cycle backwards through the
> widgets (SHIFT + TAB).
>
> Regards,
> Matthias
>
<snip>
That is weird. Just an FYI though: I left the BoxSizer in your code alone.
I decided that maybe I should just include the code too, so it's attached.
I have noticed that other people on this list have had odd things happen
to them when they use only a frame as the parent of the widgets. Robin
will hopefully weigh in and explain all.
Mike
-------------- next part --------------
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)
panel = wx.Panel(self, wx.ID_ANY)
self.box = wx.BoxSizer(wx.VERTICAL)
self.TelephoneText = wx.TextCtrl(panel, -1, "", size=(200, -1))
self.NumberPackagesText = wx.SpinCtrl(panel, -1, '', (30, 50))
self.TelephoneText11 = wx.TextCtrl(panel, -1, "Blablabla", size=(150, -1))
self.DeliveryDateText = wx.DatePickerCtrl(panel, 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)
panel.SetSizer(self.box)
panel.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