Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to make the cursor move to the next edit box automatically?

Status
Not open for further replies.

kaya17

Programmer
Feb 9, 2004
78
SG
hi, guys! really thanks a lot for all the help you've been given to me. and i am so grateful to join this forum!

i started learning MFC just a month ago, and i found it so interesting.i think you can tell from my posts that i really encountered a lot difficulites as well. but fortunately i found you guys! really thanks!

well,i am just thinking i've been received so much help from you, and just cannot help expressing my gratitude!

ok, back to my question, i have four edit box, which were seperated by"-"(cos i need the text input to format as "HH-HH-HH-HH" for a field, say field_one).

but because at first i only created one edit box(text_box_1)and a couple of other edit boxes for other fields. then after i added the three more text boxes for that field_one.(say text_box_2, text_box3, text_box4)

i limit the textinput to be 2 characters. and i want it to be like this:
when the 2 characters are keyed by the user to the text_box_1, the cursor will move to the text_box_2. and then so on to text_box_3. and text_box_4.

also, now when the tab key is pressed, the cursor moves to the other field i made before rather than text_box_2. and then after it travels all the boxes, it goes back to text_box_2. if i can make it automatically moved, then the tab key will not be used of cos. but why the order of the tab goes according to the time i built the boxes?

anybody can tell me how to do that?
thanks again!

regards,
kaya
 
Hi Kaya17,

If you choose Layout->Tab Order, you can change the tabs order by clicking all the fields in the order you want them.

Hope this helps!

Alcyone
 
thanks! alkyone! i learnt something new again =)

kaya
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top