cyberbiker
Programmer
This is a long explaination. Hope it is not as confusing as my past posts
I am writing a program in VB using a tab strip.
I created a form with the tab strip, a frame(0) and one each of the required controls(0) on the form
I read a text file where the group headings are used as the caption for the tab and where each group heading has one and only 1 tab. At this point I create the additional needed tabs according to various criteria I get from that file. Each control is a part of an array and I have a counter telling me how many parameters are created in total. intParamCount as integer.
other than a label, the controls may be a text box, combobox, or check box. A text box may or may not be buddied to a up/down control.
a label is always to the left of a control.
basically it looks like this
lbl(intParamCount) TextBox(intParamCount)
lbl(intParamCount) cbo(intParamCount)
the variable intParamCount would be the same for the label and the other control.
I have no way to determine in advance in which order (TextBox, cbo,etc) they will be created.
The question is how do I set focus so that the first control other than a label receives focus when the form loads? Then When I select a tab, I would like the first control on that tab other than the label receive focus.
When I reach the last control, I would like the tab key to move it to the next tab on the tab strip or to a exit without saving control on the form itself (I have to decide that yet)
I cannot use the tag property of the control, since I am using that property to hold a default value for each control although, I guess I can probably find another solution to that problem if some one cannot help me with a more elegant solution.
Thanks
Terry Terry (cyberbiker)
I am writing a program in VB using a tab strip.
I created a form with the tab strip, a frame(0) and one each of the required controls(0) on the form
I read a text file where the group headings are used as the caption for the tab and where each group heading has one and only 1 tab. At this point I create the additional needed tabs according to various criteria I get from that file. Each control is a part of an array and I have a counter telling me how many parameters are created in total. intParamCount as integer.
other than a label, the controls may be a text box, combobox, or check box. A text box may or may not be buddied to a up/down control.
a label is always to the left of a control.
basically it looks like this
lbl(intParamCount) TextBox(intParamCount)
lbl(intParamCount) cbo(intParamCount)
the variable intParamCount would be the same for the label and the other control.
I have no way to determine in advance in which order (TextBox, cbo,etc) they will be created.
The question is how do I set focus so that the first control other than a label receives focus when the form loads? Then When I select a tab, I would like the first control on that tab other than the label receive focus.
When I reach the last control, I would like the tab key to move it to the next tab on the tab strip or to a exit without saving control on the form itself (I have to decide that yet)
I cannot use the tag property of the control, since I am using that property to hold a default value for each control although, I guess I can probably find another solution to that problem if some one cannot help me with a more elegant solution.
Thanks
Terry Terry (cyberbiker)