[wxPython] Tabbing between wxDialog controls in Linux

Hello,

I'm new on this list and new to wxPython. I have a feeling this has
been discussed before, but couldn't find anything searching the
wxPython-usrs archives or Google.

Under Windows wxDialog's have the keyboard behavior you expect, i.e. the
tab key goes between controls, etc. Under Linux the same dialog pretty
much ignores the keyboard for navigation between controls.

The wxDialog overview states:

2. Extra functionality is automatically given to the dialog box, such
    as tabbing between items (currently Windows only).

The parenthetical comment tells me why it doesn't work now. I'd love to
know a little more. For example:

- When will wxDialog enhance the keyboard-handling implementation for
  Linux?
- Are there any publicly-available patches or extensions that add such
  support?

Thanks,
Steve

···

--

                  \_O< \_O< \_O<
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Steve Cooper Redmond, WA

That's odd, tabbing works fine on my wxDialog in Linux. I have a bunch
of wxTextCtrl's and two buttons, and tab cycles through them
perfectly...

Can't make any suggestions really, I'm rather new to wxPython myself.
But wondering, have you got anything odd in your wxDialog? Hmm, try the
wxDialog.py example, using "./run.py wxDialog.py", it has two buttons,
can you tab between them?

Hugo van der Merwe

···

On Sun, Nov 04, 2001 at 06:17:26PM +0000, Steve Cooper wrote:

Under Windows wxDialog's have the keyboard behavior you expect, i.e. the
tab key goes between controls, etc. Under Linux the same dialog pretty
much ignores the keyboard for navigation between controls.

The wxDialog overview states:

2. Extra functionality is automatically given to the dialog box, such
    as tabbing between items (currently Windows only).

Im not sure about wxDialog, but wxFrame wont process tabs unless you place a wxPanel in between. Its wxPanel that processes the keypresses and moves focus between things. Look at the wxPanel constructor for more info.

So something like...

class MyFrame(wxFrame):

  def __init__(self, parent, ID, title="My frame"):
    wxFrame.__init__(self, parent, ID, title, wxDefaultPosition, wxSize(300,200) )
    
    self.SetAutoLayout(true)
    self.SetSizeHints(285,180,400,350)
    
    self.panel=wxPanel(self,-1)
    
    #fill the whole panel
    lc=wxLayoutConstraints()
    lc.right.SameAs(self,wxRight)
    lc.left.SameAs(self,wxLeft)
    lc.top.SameAs(self,wxTop)
    lc.bottom.SameAs(self,wxBottom)
    self.panel.SetConstraints(lc)
    
    self.panel.SetAutoLayout(true)

    #now add components to the panel in the order the tab key should traverse them

I don't know how wxDialog does this though?

Kind Regards

Crispin

···

On Sun, Nov 04, 2001 at 06:17:26PM +0000, Steve Cooper wrote:

Hello,

I'm new on this list and new to wxPython. I have a feeling this has
been discussed before, but couldn't find anything searching the
wxPython-usrs archives or Google.

Under Windows wxDialog's have the keyboard behavior you expect, i.e. the
tab key goes between controls, etc. Under Linux the same dialog pretty
much ignores the keyboard for navigation between controls.

Under Windows wxDialog's have the keyboard behavior you expect, i.e. the
tab key goes between controls, etc. Under Linux the same dialog pretty
much ignores the keyboard for navigation between controls.

The wxDialog overview states:

2. Extra functionality is automatically given to the dialog box, such
    as tabbing between items (currently Windows only).

This is incorrect.

The parenthetical comment tells me why it doesn't work now. I'd love to
know a little more. For example:

- When will wxDialog enhance the keyboard-handling implementation for
  Linux?

It should be there already. Can you send a sample that shows the problem?
It may be something you are doing incorrectly.

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!