I am building a custom text control that has fields within it. I have
set up the base control to use the style wxTE_PROCESS_TAB,
and have an EVT_CHAR routine that is coded to have the TAB key step
through the cells of the custom control until it hits the right-most one,
and then do normal tab traversal processing, and to do the converse
on Shift-TAB. The former logic works properly. However, the OnChar()
routine never gets called for the Shift-TAB events; instead, my
ON_KILL_FOCUS routine gets called, and focus immediately shifts
to the previous control in the tab order of the panel.
I searched the archives for a reference to this problem, and found the
following exchange, with no further followup:
Running windows 2000, python20, wxPython2.2.
The "self" is a wxPanel.
> > I am having a very strange problem trying to process shift-tab on
> > a wxTextCtrl field.
> >
> > I use the following:
> >
> > editbox = wxTextCtrl(self, myID, "Default",wxPoint(x,y),
> > wxSize( size,19),
wxTE_PROCESS_ENTER|wxTE_PROCESS_TAB)
> >
> > EVT_CHAR(editbox, self.EvtChar)
> > EVT_TEXT_ENTER(editbox, myID, self.EvtEnter)
> >
> > Pressing TAB will trigger the event however pressing Shift-TAB will
> > not. There is only on[e] wxTextCtrl
>
> What is self and what is your platform and versions?
>
> --
> Robin Dunn
> Software Craftsman
> robin@AllDunn.com Java give you jitters?
> http://wxPython.org Relax with wxPython!
I assume the underlying problem is that wxTE_PROCESS_TAB
isn't set up to intercept the Shift-TAB events before doing normal
processing of them. Is this true? Is there any way around this?
(winNT, win98, win2K, wxPython 2.3.2.1, Python 2.2.1)
Thanks in advance,
Will Sadkin
Parlance Corporation
wsadkin@nameconnector.com
···
On Wed, 16 May 2001 14:00:09 -0700, Michael Hubbard wrote: