Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cannot access the selected table.
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00187612
Message ID:
00188176
Vues:
22
- snip -
>And now, tell me how you do your SetFocusToFirst...
>
José,

Nothing fancy. I used to use an approach similar to your UIEnabler, but determined after a while that the facility provided by the control was not outweighed by the problems it sometimes caused.

If the control I want to have focus when the page is activated is not tabstop 1, or I want to set focus to something other than tabstop 1, I merely use as mycontrol.setfocus() instruction in .activate() for the page in question.

Actually it is a little more complicated than that since I usually return focus to the control that had focus when the page was last exited -- that way the user can continue editing where he left off.

To do this reliably, I have (1) an array in my abstract pageframe that replaces the pages[] array and keeps track of, among other things, the display properties of the page (backcolor, tab ON/OFF, etc), the last control with focus, and other things and (2) a method called .activatepage() which sets all of these features for the page being activated, and a method called .deactivatepage() which stores changes to these properties for when the page is next activated.

It's a pretty basic approach, really.

regards,
Jim Edgar
Jurix Data Corporation
jmedgar@yahoo.com

No trees were destroyed in sending this message. However, a large number of electrons were diverted from their ordinary activities and terribly inconvenienced.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform