Mark_Strahan

Absent Member.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2012-05-14
22:12
1192 views
[Migrated content. Thread originally posted on 14 May 2012]
Is there a property I can set on a Winform to allow for immediate tabbing to the next field once the field I'm completing becomes full.I'm attempting to program a bank sort code fill with 3 fields (each of size 2) which I want to 'bounce' from field to field once I've completed each field of 2 characters without the user having to press the tab key themselves.
I've looked in the properties box and on the msdn material but nothing is apparent??
1 Solution
Accepted Solutions
Chris Glazier

Micro Focus Expert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2012-05-14
22:22
Set the MaxLength property on each of the text fields to the desired length.
Then create an event handler for the TextChanged event on each textbox by highlighting it in forms designer, clicking the lightning bolt icon in the properties window and double clicking on TextChanged.
Make them look something like this:
Then create an event handler for the TextChanged event on each textbox by highlighting it in forms designer, clicking the lightning bolt icon in the properties window and double clicking on TextChanged.
Make them look something like this:
method-id textBox1_TextChanged final private.
procedure division using by value sender as object e as type System.EventArgs.
if textBox1::TextLength = textBox1::MaxLength
invoke textBox2::Focus
end-if
end method.
2 Replies
Chris Glazier

Micro Focus Expert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2012-05-14
22:22
Set the MaxLength property on each of the text fields to the desired length.
Then create an event handler for the TextChanged event on each textbox by highlighting it in forms designer, clicking the lightning bolt icon in the properties window and double clicking on TextChanged.
Make them look something like this:
Then create an event handler for the TextChanged event on each textbox by highlighting it in forms designer, clicking the lightning bolt icon in the properties window and double clicking on TextChanged.
Make them look something like this:
method-id textBox1_TextChanged final private.
procedure division using by value sender as object e as type System.EventArgs.
if textBox1::TextLength = textBox1::MaxLength
invoke textBox2::Focus
end-if
end method.
Mark_Strahan

Absent Member.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2012-05-15
10:31
Most excellent.
Thanks.
Thanks.