Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding code to events programmatically
Message
De
09/02/2016 14:01:57
 
 
À
09/02/2016 13:52:49
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Versions des environnements
Visual FoxPro:
VFP 7
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01631115
Message ID:
01631128
Vues:
78
>I think you're missing the question, Craig - the code isn't changing at runtime. In the form designer I will place an object, then go to the events, and put the code in there, but adding an object at runtime, like a listbox, is there nowhere I can add code that runs every time it is clicked? As in the Click event of the object in the form designer...
>
>As in something along the lines of:
>Object.Click
>do this
>do that
>do the other thing
>endobject.click
>
>Google isn't giving me anything useful. I saw proc/endproc, but nothing I could copy in and fill my stuff into, and where would I put it?
>
>The problem is I use a small SQL Select into a cursor, and the ListBox uses that doe it's data, but if I have the ListBox there already, even if it has no RowSource, or RowSourceType, I get error 1130's up the yin yang in methods that don't exist, and in lines that I have no idea where they come from. It is just nuts. Put the listbox in on hte form designer, and it bombs. Add it programatically, and it works fine. All I need is a where, and how to put a click event for it...

If the code you need is the same and you just need to add the list dynamically, the right way to do it is to create a listbox class that contains the code and add an object of that class.

Tamar
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform