T
Tom
I have a wierd situation... Have a Windows Form with a number of text boxes,
combo boxes, etc. After the user enters a value inside my first text box
(tabindex 0), I then dynamically create a number of label - Textbox
combination fields inside a panel in the form. During the creation of those
fields I set the TabIndex to a incrementing number (that is between current
tab indexes) and the TabStop to True. However, once I create these dynamic
fields the tabbing sequence goes all to heck. For instance, tabbing on the
first dynamically created text box (tab index 21) causes the focus to go
back to the first text box on the screen! (tab index 0) Tabbing from there
causes focus to go to one of the buttons on the bottom of the screen (rather
than tab index 2).... etc etc etc.
This is driving me crazy.... I even went so far as to hook the KeyPress
events for these fields and use SelectNextControl if the key is a tab - but
that doesn't work either. The tab numbers look OK, but it is as though the
tab sequence doesn't matter anymore!
Anyone got any ideas on this? Otherwise, I may have to code specifically for
EACH control and set the focus accordingly (which sucks).
Tom
combo boxes, etc. After the user enters a value inside my first text box
(tabindex 0), I then dynamically create a number of label - Textbox
combination fields inside a panel in the form. During the creation of those
fields I set the TabIndex to a incrementing number (that is between current
tab indexes) and the TabStop to True. However, once I create these dynamic
fields the tabbing sequence goes all to heck. For instance, tabbing on the
first dynamically created text box (tab index 21) causes the focus to go
back to the first text box on the screen! (tab index 0) Tabbing from there
causes focus to go to one of the buttons on the bottom of the screen (rather
than tab index 2).... etc etc etc.
This is driving me crazy.... I even went so far as to hook the KeyPress
events for these fields and use SelectNextControl if the key is a tab - but
that doesn't work either. The tab numbers look OK, but it is as though the
tab sequence doesn't matter anymore!
Anyone got any ideas on this? Otherwise, I may have to code specifically for
EACH control and set the focus accordingly (which sucks).
Tom