Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Find the current control
Message
 
 
À
12/04/2006 20:01:46
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
01113196
Message ID:
01113914
Vues:
16
A little word of caution: don't forget to check to existance of ActiveControl by checking type('thisform.myPageFrame.ActivePage.ActiveControl.name') = 'C'
because there could be situations with no ActiveControl.

>Thanks Kurt. That'll work.
>
>>Check the .ActivePage for a pageframe and .ActiveControl properties for a page. It is also a good habit to use PEMSTATUS() when you are referencing properties indirectly to ensure that they really property exist.
>>
>>Should be something like:
>>
>>IF PEMSTATUS(frmMain.tabs1.ActivePage.ActiveControl,'someproperty',5)
>>     myvalue = frmMain.tabs1.ActivePage.ActiveControl.someproperty
>>ELSE
>>     **** Error ****
>>ENDIF
>>
>>
>>Hope this helps.
>>Kurt
>>
>>>Is there an easy way to identify the control that has focus? I have several custom controls located on a page. Each instance of the subclass has a grid, one of which will have focus when I ask "which instance of the subclass has focus?" Something like
>>>
>>>myvalue = frmMain.tabs1.page8.currentcontrol.someproperty
>>>
>>>Thanks for your help.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform