Getting focus on form load
-
Here is the basic layout. Inside of a group box, I have a textbox. Outside of the groupbox, I have a command button. On load, the command button has focus. I have tinkered with the tab index to put focus on the textbox when the form loads, but to no avail. The only answer I have now is to disable the command button until I have text in the textbox, but I don't know if that will put focus on the textbox initially. Ideas?! Thanks in advance.
-
Here is the basic layout. Inside of a group box, I have a textbox. Outside of the groupbox, I have a command button. On load, the command button has focus. I have tinkered with the tab index to put focus on the textbox when the form loads, but to no avail. The only answer I have now is to disable the command button until I have text in the textbox, but I don't know if that will put focus on the textbox initially. Ideas?! Thanks in advance.
Not sure, but here is what I'd do. When you are designing the layout of your form, go to the file menu and select View - Tab Order. This makes these little blue boxes with numbers appear next to each control. The numbers show the tab order...but when you have a group box, you have sort of like sub tab orders. So you need to first let the designer know that the Groupbox is the first item to have focus, then the textbox, then the command button. To do this, click on each of the controls in that order (watch the numbers change as you do it). Then from the file menu select View - Tab Order again to shut off the tab order view. If you mess up, just shut off the tab order view and then start it up again.
-
Not sure, but here is what I'd do. When you are designing the layout of your form, go to the file menu and select View - Tab Order. This makes these little blue boxes with numbers appear next to each control. The numbers show the tab order...but when you have a group box, you have sort of like sub tab orders. So you need to first let the designer know that the Groupbox is the first item to have focus, then the textbox, then the command button. To do this, click on each of the controls in that order (watch the numbers change as you do it). Then from the file menu select View - Tab Order again to shut off the tab order view. If you mess up, just shut off the tab order view and then start it up again.