Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Disable buttons during process - odd behaviour
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00856233
Message ID:
00856380
Vues:
29
>Caroline,
>
>You might want to try this as well
>
>ThisForm.SetAll("Enabled", .F., "cmd")
>doevents
>* do the long running thing
>
>The doevents forces VFP into the event handler which should give time for the disabling to appear before the SQL kicks off.
>
>The .Refresh() method only updates the displayed value in the control from its .ControlSource, since your buttons aren't bound there's not anything to refresh.
>

Hi David,

I would disagree with this interpretation of Refresh() method functionality.

According to Help:

Refresh Method

Repaints a form or control and refreshes any values, or refreshes a project's visual display.


The definition of control in Help:

A graphical object, such as a text box, a rectangle, or a command button, that you place on a form to display data, perform an action, or make the form easier to read. Visual FoxPro controls include check boxes, edit boxes, labels, lines, images, shapes, and so on.

Therefore, Form.Refresh() is supposed to repaint the command button according it's changed state, i.e. Enabled = .f., not only "updates the displayed value in the control from its .ControlSource" as you say.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform