Re: Tabbing problem in Child Window
- Posted by Jonas Temple <jtemple at yhti.net> Feb 13, 2007
- 475 views
Rad wrote: > > Hi, > > Say I have following 7 fields to be accepted in a Child Window: > > ==================================== > Emp. Code : [ ] > Name : [ ] > Address : [ ] > [ ] > [ ] > Date of : [ / / ] > Birth > Tel.No. : [ ] > ==================================== > > Now the ENTER/TAB key moves the focus to next field in circular way. > > My problem starts when I validate the Date field, in fact for any field which > is validated. > If invalid date is encountered, I am displaying an error message using > message_box() > and focusing back on Date field using setFocus(). > > E.g. First time I enter invalid date by mistake, and then enter valid date > after > error message. > When I enter a valid date and press ENTER, focus jumps to Emp.Code instead of > Tel.No. field. > If I enter invalid date 3 times in a row before entering a valid date, focus > jumps to first > line of the Address field. > > How to stop/rectify this behaviour? > How to set the correct Tab sequence? > > Regards, > Rad. First, let me answer your last question. The tab order is based on the order the controls are created. Now as for the weird cursor positioning, perhaps if we had a look at your code we could help. Jonas Temple http://www.innovativesys.net