Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to reference a text box on a form from a proc librar
Message
De
04/12/1998 18:11:29
 
 
À
04/12/1998 18:08:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00164324
Message ID:
00164338
Vues:
27
>>>I need the full name of a text box object from within a procedure library...
>>>
>>>_SCREEN.ACTIVEFORM.ACTIVECONTROL.NAME only returns 'txtPrompt'
>>>
>>>What I need is 'form1.PgFrame.Page1.cnt01.txtPrompt'
>>>
>>>How can I accomplish this?
>>>
>>>TIA
>>>
>>>Larry
>>
>>May I ask you, why do you need in full reference? You may use Activecontrol object to call any its PEMs.
>
>I'm trying to call a UDF from the VALID method. The UDF may do more than validate the input... such as left zero filling the textbox. This is why I need to reference the textbox.
>
>Also, while in the textbox, the user may press F5 to display a 'Prompt' screen listing valid entries. In this case, I *don't* want the VALID to fire...
>
>Your approach works fine, until I display the Prompt screen. Subsequent calls to VALID return an error ... "activecontrol is not an object"
>
>But I'm closer
>
>Thanks

You don't need in Activeform/control here. Instead of this your UDF should accept object reference:
***Control.Valid event
=myudf(this)
***myudf code
Function Myudf
LParameter oControl
if oControl.Value=...
oControl.Value=...
Endif
Return
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform