Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
A simple focus....
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00611318
Message ID:
00611323
Vues:
20
Hi Ric,

You don't need the macro expansion, just do:
IF !EMPTY(THISFORM.cDefault)
  THISFORM.cDefault.setfocus()
ENDIF
-or-
IF !EMPTY(THISFORM.cDefault)
  lcDefault = THISFORM.cDefault
   ** No macro needed, lcDefault is alread an object reference
   ** and you can access it's PEMs directly through the var.
  lcDefault.SetFocus()
ENDIF
IAC, IIRC to do macro expasion you need 2 dots (..) between the var and the method call. &lcDefault..SetFocus()

hth

>TIA to you all because this is a no brainer (I left mine at home today).... in certain situations I pass a default control name to a form property.... I want the form to select that control id as the next to get focus - overriding the tab order.... could some please tell me why this isn't working??
>
>IF !EMPTY(THISFORM.cDefault)
> lcDefault = THISFORM.cDefault
> &lcDefault.SetFocus()
>ENDIF
>
>I know the answer is here somewhere, but not in my brain today... :-)
>
>Ric
Roi
'MCP' Visual FoxPro

In Rome, there was a poem.
About a dog, who found two bone.
He lick the one, he lick the other.
He went pyscho, he drop dead!
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform