Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to force Active Control
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00135484
Message ID:
00135485
Vues:
8
>Hi all,
>
>This *seemed* simple enough but I'm stumped. I have a form with 2 comboboxes (and a label for each) at the top, and a pageframe beneath it. When the user hits a AddNew button, this same form goes into data entry mode. So after the AddNew button sets up the form for data entry, I need to add the following functionality without changing existing AddNew functionality:
>
>-I need to disable the 2 comboboxes above (and outside of) the PageFrame, Make Page1 the Active Page, And make the first control on Page1 the Active control.
>
>Disable comboboxes - no problem
>Make Page1 active page - no problem
>Make the first Control on Page1 active - weirdness
>
>It seems (no matter what I do) that the first disabled combo is under the impression of being the active control because when I run the form I see no cursor outline indicating an active control, and if I hit the TAB key the first disabled combo suddenly shows a value and the cursor moves to the caption of Page1. I've tried changing TabStops, TabIndex, and Zorder to no avail. Even tried KEYBOARD '(TAB)' to simulate hitting the tab key twice to get to the 1st control on Page1 and nothing seems to work. Any ideas how I can code something in my AddNew method that basically says to the form "go here and make this control active" ?

Normally, SETFOCUS() wroks Ok. If not, then you add NODEFAULT. If it still doesn't work you can fortify by adding This.Control.SETFOCUS() to Page.Activate event. Ultimately, you can put KEYBOARD '{TAB}' to Page.Activate event.
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform