Tabbing and Sized Controls

Hi Kevin,

Tabbing doesn't seem to work out of the box in SizedDialogs. See the
form demo. Hitting tab in the first text control moves focus to the OK
button instead of the next text control. What can I do to fix or work
around that?

Cheers, Frank

Hi Frank,

Hi Kevin,

Tabbing doesn't seem to work out of the box in SizedDialogs. See the
form demo. Hitting tab in the first text control moves focus to the OK
button instead of the next text control. What can I do to fix or work
around that?

I just checked the example here (OS X 10.4.9, latest wxPython 2.8.4 pre-release) and hitting tab in the first text control moves it to the next one, not the OK button. What platform/wxPy version are you seeing this on?

Thanks,

Kevin

···

On May 10, 2007, at 2:53 PM, Frank Niessink wrote:

Cheers, Frank

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

Hi Kevin,

I just checked the example here (OS X 10.4.9, latest wxPython 2.8.4
pre-release) and hitting tab in the first text control moves it to
the next one, not the OK button. What platform/wxPy version are you
seeing this on?

Windows XP, Python 2.5, wxPython 2.8.3. I was making a password
dialog based on the example in the demo, noticed the weird tabbing and
then noticed the demo has the same behaviour. In that form demo, if I
click another field and then hit tab focus also moves to the OK
button. It seems like the panel is a single unit from tabbing
perspective.

Cheers, Frank

···

2007/5/10, Kevin Ollivier <kevino@theolliviers.com>:

Hi Frank,

Hi Kevin,

I just checked the example here (OS X 10.4.9, latest wxPython 2.8.4
pre-release) and hitting tab in the first text control moves it to
the next one, not the OK button. What platform/wxPy version are you
seeing this on?

Windows XP, Python 2.5, wxPython 2.8.3. I was making a password
dialog based on the example in the demo, noticed the weird tabbing and
then noticed the demo has the same behaviour. In that form demo, if I
click another field and then hit tab focus also moves to the OK
button. It seems like the panel is a single unit from tabbing
perspective.

Thanks for reporting this! Robin and I looked into it and turns out it's a bug with wx.PyPanel (which SizedPanel derives from). wx.PyPanel sets its style argument to 0, whereas it should be wx.TAB_TRAVERSAL | wx.NO_BORDER, like wx.Panel. Apparently on Mac it doesn't make any difference...

This will be fixed in the next release, but if you want a quick fix, go into site-packages/wxaddons/sized_controls.py, down to the __init__ methods for both SizedDialog and SizedFrame, and add "style=wx.TAB_TRAVERSAL | wx.NO_BORDER" on the line that creates the SizedPanel in there.

Regards,

Kevin

···

On May 10, 2007, at 3:10 PM, Frank Niessink wrote:

2007/5/10, Kevin Ollivier <kevino@theolliviers.com>:

Cheers, Frank

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org