Odd Behavior: Dialog, cannot focus OK button with tab key

Hi, I've created a simple dialog, with a couple of
text controls and two buttons, a Cancel Button and an
OK button.

The problem I'm experiencing is that when you tab from
control to control, the system "skips" over the OK
button. In otherwords I can set the focus of the
individual controls via tab except for the OK button.

I've dug through mailing archives and googled
newsgroups to no avail. The code is as follows:

Any help would be appreciated!

class ChunkDialog(wxDialog) :
  def __init__(self,parent=None) :
    wxDialog.__init__(self, parent, -1, "New Chunk",
wxDefaultPosition,
                    wxDefaultSize,
wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER )

    self.sizer = wxBoxSizer( wxVERTICAL )

    self.entry = wxTextCtrl(self, -1,
style=wxTE_PROCESS_ENTER )
    self.text = wxTextCtrl(self, -1,
style=wxTE_MULTILINE )
    self.bOk = wxButton(self, wxID_OK, " &Ok ")
    self.bOk.SetDefault()
    self.bCancel = wxButton(self, wxID_CANCEL, " &Cancel
")

    self.sizer.Add( self.entry,1, wxALL|wxEXPAND,10)
    self.sizer.Add( self.text, 1, wxALL|wxEXPAND,10)

    hor = wxBoxSizer( wxHORIZONTAL )
    hor.Add( self.bOk, 0, wxALL,10 )
    hor.Add( self.bCancel, 0, wxALL,10 )
    self.sizer.Add( hor, 0, wxALIGN_CENTER)
    
    self.SetSizer(self.sizer)
    self.sizer.SetSizeHints( self )

# EVT_BUTTON( self, wxID_CANCEL, self.OnCancel)
# EVT_BUTTON( self, wxID_OK, self.OnOK)
    
  def GetTag(self) : return self.entry.GetValue()
  def GetText(self) : return self.text.GetValue()

  def OnOK(self,event) :
    self.EndModal(COMPLETED)
  def OnCancel(self,event) :
    self.EndModal(CANCELED)

···

__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

http://lists.wxwindows.org/archive/wx-users/msg35705.html

Found the bug for those that are interested.

"This is known bug 658026 in wxTE_MULTILINE controls
on MSW. You can't do lot without recompiling wxWindows
library. I'd be willing to fix this in the code."

Oddly enough it seems the bug has been open since
2002, with recent updates as late as 2003 in May.

Can anyone tell me the typical release schedule for
wxPython and additionally who do I contact for
submitting patches?

Cheers,
  Shane

···

--- Shane Adams <adamsch1@yahoo.com> wrote:

Hi, I've created a simple dialog, with a couple of
text controls and two buttons, a Cancel Button and
an
OK button.

The problem I'm experiencing is that when you tab
from
control to control, the system "skips" over the OK
button. In otherwords I can set the focus of the
individual controls via tab except for the OK
button.

I've dug through mailing archives and googled
newsgroups to no avail. The code is as follows:

Any help would be appreciated!

class ChunkDialog(wxDialog) :
  def __init__(self,parent=None) :
    wxDialog.__init__(self, parent, -1, "New Chunk",
wxDefaultPosition,
                    wxDefaultSize,
wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER )

    self.sizer = wxBoxSizer( wxVERTICAL )

    self.entry = wxTextCtrl(self, -1,
style=wxTE_PROCESS_ENTER )
    self.text = wxTextCtrl(self, -1,
style=wxTE_MULTILINE )
    self.bOk = wxButton(self, wxID_OK, " &Ok ")
    self.bOk.SetDefault()
    self.bCancel = wxButton(self, wxID_CANCEL, "
&Cancel
")

    self.sizer.Add( self.entry,1, wxALL|wxEXPAND,10)
    self.sizer.Add( self.text, 1, wxALL|wxEXPAND,10)

    hor = wxBoxSizer( wxHORIZONTAL )
    hor.Add( self.bOk, 0, wxALL,10 )
    hor.Add( self.bCancel, 0, wxALL,10 )
    self.sizer.Add( hor, 0, wxALIGN_CENTER)
    
    self.SetSizer(self.sizer)
    self.sizer.SetSizeHints( self )

# EVT_BUTTON( self, wxID_CANCEL, self.OnCancel)
# EVT_BUTTON( self, wxID_OK, self.OnOK)
    
  def GetTag(self) : return self.entry.GetValue()
  def GetText(self) : return self.text.GetValue()

  def OnOK(self,event) :
    self.EndModal(COMPLETED)
  def OnCancel(self,event) :
    self.EndModal(CANCELED)

__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
Yahooist Teil der Yahoo Markenfamilie

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

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

__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard