Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Does Refresh work on a textbox Not Visible?
Message
De
10/03/2021 03:55:49
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01678801
Message ID:
01678871
Vues:
48
>>>Hi,
>>>
>>>Say I have a text box on a form/window. The Refresh of the text box has a code that get the value from a child table (based on a PK) and puts it into the .Value property.
>>>Does this code still fire when the textbox Visible property is set to .F.?
>>>
>>>TIA
>>
>>I believe not, but it should be easy to test - just add some wait window in that method to see
>
>The Refresh fires even when the control's property Visible is set to .F. and the Enabled = .F. I guess to make this code not to fire, I will have to create some semaphore variable. I thought VFP would not fire the Refresh of a hidden control. But I was mistaken.

I guess you fire THISFORM.refresh? What about moving all the refresh action out of the single controls and to a method of the form? There you can determine the state at once and do only that what you have to do.
OTOH textbox. refresh may look like
if this.visible
*do anything
endif
and you are done as well. Only more code firing.
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform