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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tab Stop

Status
Not open for further replies.

Stella740pl

Programmer
Jul 3, 2003
2,657
US

I have a form that has several option groups, Enabled property of which is set to .T. in the design, but in the Show method each of them is reset to either .T. or .F. depending on values of other controls. At the start, all of them would be set to .F., since those other controls are not populated.

Then I enter month and year and press the command button I called “Validate”. Upon validation, the code is run which populates the controls in the form, and the fragment with setting the option groups to either .T. or .F. is repeated here (well, I will probably make it into a separate method when I have time and call it when needed, but not yet). Usually first few consecutive groups, if any, are getting enabled, and all the rest stay disabled.

The TabIndex properties of the option groups have values right next after the month/year text box and the “Validate” button; each single option has TabStop set to .T. and TabIndexes 1 and 2 within each group.

So why after I press the “Validate” command button, and then hit the Tab key, it doesn’t stop at the enabled already at this point option groups and goes straight to the next control?

Thanks.
Stella
 

Sorry, there is a correction.
I don't even hit the Tab key, it jumps to the next control right after the code in the command button is run.
 

I am sorry.
I feel so stupid.
I had an explicit SetFocus there.
This is a "remake" of an old form I've created myself several years ago, so I forgot some detail. This morning on my way to work it hit me that it could be the case - and of course it is.

Stella
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top