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:
00856389
Vues:
34
Nick,

You are right, it's been too long since I read that help topic. But that doesn't exactly explain why the heck it doesn't reliably do what the help file says it's supposed to do and forcing a call to Draw(). *bg*

I'll amend my recommendation to:
ThisForm.SetAll("Enabled", .F., "cmd")
Thisform.Refresh()
doevents
* do the long running thing
I use the .Refresh of buttons all the time with code something like this:

this.Enabled = f( SomethingAboutSomeFieldOfTheCurrentRow )

without experiencing paint problems.


>I would disagree with this interpretation of Refresh() 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.
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform