Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ListBox and Text
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00867901
Message ID:
00867921
Vues:
25
Steve,

>I want to have that lName appear in the TextBox when I select a name and then double click on it.
>
>So, in the form Designer, with list1, I right clicked, then chose code, then DoubleClikc, and then tried to enter the following, neither of which worked:
>
>thisform.LastName.Value = thisform.list1.Value

What are the ControlSource values for the listbox and textbox? If both are bound to the table/view a simple thisform.Refresh() would be all you need to keep things in synch.

>_screen.activeForm.LastName.Value = _screen.activeForm.list1.Value

As a general rule, wherever possible use thisform instead of _screen.Activeform. thisform is guaranteed to be the actual containing form of the object. _screen.ActiveForm is subjective whenever you have more than one form running at the same time.

>I I select and then try to execute the lines, I am told that thisform and activeform can't be used. How can I refer to the material in a form then?

You can not highlight and execute code like this at designtime, because the form is not really running, so thisform does not contain a valid object reference. You must first actually run the form, then if you suspend execution with a SET STEP ON in one of the methods, you can then test run small chunks of code from the command window or from another MODI COMM window. You can also highlight code fragments from the trace window and copy/paste them to the modi comm window to tweak on it.

If you are just now picking up VFP as a tool, the EventLogger of the debugger can really give you a lot of help figuring out the order of event firing as you interact with controls. You probably want to turn off MouseMove and Paint because they clutter up the output.
df (was a 10 time MVP)

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

Click here to load this message in the networking platform