Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
A runtime value
Message
De
24/09/2001 21:34:57
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
 
À
24/09/2001 18:27:34
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Divers
Thread ID:
00560292
Message ID:
00560338
Vues:
16
>Hello
>
>This is a teorethical one. I solved it, but I still have a question.
>
>Suppose I have a form with a textbox and a button. The button have a custom property, named 'myprop'. In Properties window, I write the following as value for that property: =ThisForm.TextBox1.Value.Taborder is set 1 for textbox, 2 for button.
>
>
>In runtime, button1.myprop is .F. Can anyone explain why, please?

Because it's evaluated during the .init, before the controls are actually bound. If you want it to be re-evaluated at .refresh, you need to have the expression surrounded by parentheses, i.e. =(ThisForm.TextBox1.Value.Taborder)

Also, the tab order doesn't necessarily equal instantiation order. If you want to have a control instantiated the last, use the layout toolbar to bring it to front. Close and reopen the form, and check that your control really is the last in the combo of the PEM window. If there's just too many controls to do them one by one, I have a builder uploaded here (in files section, or just click on my name) which will order them the same as they are ordered by tab order. Again, I must repeat that surgeon admiral has decided that relying on the order of instantiation of controls may work, but also may not, and can cause debugger addiction...

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform