Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Passing the current object as a parameter
Message
De
31/12/2003 14:54:24
 
 
À
31/12/2003 14:42:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00863202
Message ID:
00863206
Vues:
13
>Hello everyone,
>
>I need to create a shortcut menu that is activated when we right click on my textbox object and I have to pass the current object as a parameter to a function that will call getfont().
>
>My problem is that I don't know how I can pass my form's current object to my function in a generic way... so I can put the code in my textbox parent object.

does the textbox rightclick bubble up to the container?
in your container, you can pass thisform.ActiveControl to the menu, e.g.
** form.RightClick() - bubbled up to here
DO myshortcut WITH this.ActiveControl
in the menu's Setup code add
PARAMETERS poActive
and reference that in the menu code which passes on to the function.
Insanity: Doing the same thing over and over and expecting different results.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform