On Monday, October 25, 2010 11:59:44 am Jim Byrnes wrote:
> John Fabiani wrote:
> > On Monday, October 25, 2010 06:55:48 am Jim Byrnes wrote:
> >> Ed Leafe wrote:
> >>> On Oct 23, 2010, at 9:50 AM, Jim Byrnes wrote:
> >>>> What controls which key causes movement to the next control in the
> >>>> tab order?
> >>> 
> >>> Tab is the only key which is expected to advance focus.
> >>> 
> >>>> I now have a mixture of dTextBoxes and dMaskedTextBoxes.  Only the
> >>>> Tab key will cause movement in a dTextBox, but either the Tab or
> >>>> the Enter keys will work in a dMaskedTextBox.
> >>> 
> >>> Interesting - I don't use dMaskedTextBox much
> >>> 
> >>>> I would like the Enter key to work throughout my form. I realize I
> >>>> could replace all of the dTextBoxes, but thought it might be easier
> >>>> if there was just some setting I was unaware of that could be
> >>>> changed.
> >>> 
> >>> I am working on generalizing the code to add navigation keys to all
> >>> the controls. It may take a day or two until it's ready.
> >>> 
> >>> 
> >>> -- Ed Leafe
> >> 
> >> Thanks for the info.  I'm in no hurry, I've decided it's best for me to
> >> wait for the web updates anyway.
> >> 
> >> Regards,  Jim
> > 
> > This is interesting - because I use dMaskedTextBoxes and I believe that
> > the tab key does work.  At least for the formats I'm using such as
> > phone, ssan, on number.
> > 
> > Johnf
> 
> Both the Tab and the Enter key work for me in dMaskedTextBoxes.  Right
> now I have a mixture of the two and want to be consistent throughout the
> form.  For numeric data entry I prefer using the Enter key so I am
> looking to make the Enter key work on all fields.
> 
> Regards,  Jim

I do some like the following:
if evt.keyCode in 
[dKeys.key_F1,dKeys.key_F2,dKeys.key_F3,dKeys.key_F5,dKeys.key_F6,dKeys.key_F8,dKeys.key_F9,dKeys.key_F10,dKeys.key_F11,dKeys.key_F12]:
            return
        if evt.keyCode in [dKeys.key_F7, dKeys.key_F4, dKeys.key_Return]:
            thestr= self.Form.lookup(evt)
            return 
        #print keyChar 
        keyChar=evt.keyChar
        if (keyChar in """,./<>?;':"[]\\{}|`...@#$%%^&*()_=+"""):  ## removed 
the dash
            evt.stop()

also check
 if sys.platform == 'win32':
            vendcomp._addWindowStyleFlag(wx.TE_PROCESS_ENTER)

Johnf
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to