[wxPython-users] location in tab order?

Josiah Carlson jcarlson at uci.edu
Fri Sep 15 10:51:17 PDT 2006


"S. D. Rose" <s_david_rose at hotmail.com> wrote:
> 
> Hello all.  I'm wondering if it's possible to know where in the tab order 
> the cursor is (focus is) ?  Specifically, I have say 7 text boxes (f. name, 
> l. name, address, phone, city, state, zip).  So, if someone fills out f. 
> name, l. name, phone, but haven't gotten to city, state and zip yet; I'd 
> like to know if there's a way to know what text controls ABOVE the cursor 
> haven't been filled-out, but not below?
> 
> So, if I've gotten half way thru the tab order, and left blank 2 fields, I 
> want them to be high-lighted to show they're empty, but not the fields that 
> I haven't gotten to yet?

Bind EVT_SET_FOCUS on all of your text controls, and perhaps any 'OK' or
'Apply' buttons.

When one of them gets the focus, for each control previous to the
focused control in the tab order, if it is empty, change its background
color.


 - Josiah





More information about the wxpython-users mailing list