Tab key not working with form

Hi all,

I created a simple form using WxGlade consisting of TextCtrls and Labels. For some reason the tab key isn’t working when I run the script. How do a tab focus to the next field?

Thanks!

Erik

Erik,

Hi all,

I created a simple form using WxGlade consisting of TextCtrls and Labels. For some reason the tab key isn't working when I run the script. How do a tab focus to the next field?

Thanks!
Erik

What's the parent for the TextCtrls? I'm pretty sure they can act goofy if the parent is not a wx.Panel instance (and it looks odd without a panel on Windows). And you can't tab to a label as wx.StaticText widgets cannot receive focus.

They should tab in the order in which you created the widgets unless you've explicitly changed the order.

···

-------------------
Mike Driscoll

Blog: http://blog.pythonlibrary.org
Python Extension Building Network: http://www.pythonlibrary.org

Mike,

It’s layed out as follows:

Application=>Frame=>Grid Sizer=>TextCtrl

Do I need to put a panel between the Sizer and the TextCtrl?

Thanks!
Erik

···

On Tue, Oct 7, 2008 at 1:28 PM, Mike Driscoll mike@pythonlibrary.org wrote:

Erik,

Hi all,

I created a simple form using WxGlade consisting of TextCtrls and Labels. For some reason the tab key isn’t working when I run the script. How do a tab focus to the next field?

Thanks!

Erik

What’s the parent for the TextCtrls? I’m pretty sure they can act goofy if the parent is not a wx.Panel instance (and it looks odd without a panel on Windows). And you can’t tab to a label as wx.StaticText widgets cannot receive focus.

They should tab in the order in which you created the widgets unless you’ve explicitly changed the order.


Mike Driscoll

Blog: http://blog.pythonlibrary.org

Python Extension Building Network: http://www.pythonlibrary.org


wxpython-users mailing list

wxpython-users@lists.wxwidgets.org

http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

Hi Erik,

Mike,

It's layed out as follows:

Application=>Frame=>Grid Sizer=>TextCtrl

Do I need to put a panel between the Sizer and the TextCtrl?

Thanks!
Erik

When I create an application, I usually do this:

myFrame = wx.Frame(*args)
myPanel = wx.Panel(myFrame, *args)
myWidget = wx.TextCtrl(myPanel, *args)
sizer.Add(myWidget)

So to use your sequence, it would go like this in my programs:

Application=>Frame=>Panel==>Grid Sizer=>TextCtrl

I hope that helps!

- Mike

···

On Tue, Oct 7, 2008 at 1:28 PM, Mike Driscoll <mike@pythonlibrary.org > <mailto:mike@pythonlibrary.org>> wrote:

    Erik,

        Hi all,

        I created a simple form using WxGlade consisting of TextCtrls
        and Labels. For some reason the tab key isn't working when I
        run the script. How do a tab focus to the next field?

        Thanks!
        Erik

    What's the parent for the TextCtrls? I'm pretty sure they can act
    goofy if the parent is not a wx.Panel instance (and it looks odd
    without a panel on Windows). And you can't tab to a label as
    wx.StaticText widgets cannot receive focus.

    They should tab in the order in which you created the widgets
    unless you've explicitly changed the order.

    -------------------
    Mike Driscoll

    Blog: http://blog.pythonlibrary.org
    Python Extension Building Network: http://www.pythonlibrary.org

    _______________________________________________
    wxpython-users mailing list
    wxpython-users@lists.wxwidgets.org
    <mailto:wxpython-users@lists.wxwidgets.org>
    http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

------------------------------------------------------------------------

_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users