Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Make field in form visible only when a condition is met
Message
 
 
À
31/10/2002 04:15:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00716977
Message ID:
00717296
Vues:
13
>Nadia,
>
>I tend not to agree with DODEFAULT() in a Refresh() method, as I regard it as troublesome. Users, and even developers, only seldom notice that trouble, but behind the scene certain refreshes are sometimes done more than once and therefore too often. Have you ever noticed that effect?
>

I noticed, but in this particular case I suggest to put dodefault() in control's Refresh, not the form refresh. One control should not be a big problem. Without dodefault() field's value has not became text box value yet.

Of course, if you know for sure, that your controls don't have anything coded in Refresh method (or any another event), it's better not to use dodefault()

>>>I need to make a field visible only when a condition is met in a fomr.
>>>I would like this to show when the record is shown in a form.
>>>
>>>Example:
>>>I am using the wizard control buttons for next, prev. etc..
>>>While scrolling through the records I want a field to show up
>>>if the contents ='prospect' only and not when it ='customer'
>>>
>>>Tried in all properties of CustType but it didn't work
>>>
>>>IF ThisForm.CustType.Value='prospect'
>>> ThisForm.CustType.Visisvle=.T.
>>>Else
>>> ThisForm.CustType.Visisvle=.F.
>>>ENDIF
>>>
>>>Any suggestions?
>>>
>>>Andy
>>
>>In the refresh of this control put
>>dodefault()
>>this.visible = myTable.CustType="prospect"
If it's not broken, fix it until it is.


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

Click here to load this message in the networking platform