>>>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
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.
OffThere is no place like [::1]