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

VFP6 - disable TAB control on a pageframe 2

Status
Not open for further replies.

eric43

Programmer
Apr 29, 2005
94
AU
I have a page which has a complex set of option controls which can be addressed in any order eg when option 1 is chosen a second option is enabled ( one of a number of possibilities )- how can I disable the TAB control?

Thanks

Eric
 
Mike's suggestion will eliminate the use of the TAB key for moving from form field to field.

But it sounds as though you really want each variable field to control the access permission to other variable fields.

From your question, I am not certain if your "options" are Textboxes, CheckBoxes, OptionGroups, etc. But the following would, in general, apply to all.

Why don't use use the Valid Method of the individual variable fields to set/re-set the Enable property for these other variable fields?

Code:
* --- In the CheckBox 1 Valid Method ---
IF This.Value = 1
   * --- Checked ---
   ThisForm.Check2.Enabled = .F.
   ThisForm.Check3.Enabled = .T.
   ThisForm.Check4.Enabled = .F.
   ThisForm.Text1.Enabled = .F.
   ThisForm.Text2.Enabled = .T.
ELSE
   * --- Not Checked ---
   ThisForm.Check2.Enabled = .T.
   ThisForm.Check3.Enabled = .F.
   ThisForm.Check4.Enabled = .T.
   ThisForm.Text1.Enabled = .T.
   ThisForm.Text2.Enabled = .T.
ENDIF

In this way a form field setting may allow or dis-allow the user access into other associated form fields.
And, no matter if the TAB key (TabStop) was set .T. or .F. the access would apply.

You can expand this approach to analyze the status of multiple form field settings and use DO CASE/ENDCASE on various combinations of settings to make similar Enabled settings.

Good Luck,
JRB-Bldr
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top