Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Which Method has called myMethod?
Message
De
17/02/2006 03:59:36
 
 
À
16/02/2006 17:20:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01096805
Message ID:
01096989
Vues:
15
>thisform.ActiveControl

Yes it Worked!!!
Now I tell the whole story.
I wanted to create a ToolBar and Add CommandButtons on it at Runtime. But I could not Add the CommandButtons.Click Methods' code at Runtime.
Then I used BindEvent() for these CommandButtons.
oToolBar.ADDOBJECT('&cObjName','CommandButton')
BindEvent(&cObjName, "Click", oToolBar, "myClick", 2)

Now I used thisform.ActiveControl to Check which CommandButton of oToolBar was clicked.
m.loActiveControl = this.activecontrol && in myClick
do case
case m.loActiveControl.name = 'CmdButton1'
do ...
case m.loActiveControl.name = 'CmdButton2'
do ...
endcase

If BindEvent could pass parameters suppose
BindEvent(&cObjName, "Click", oToolBar, "myClick('&cObjName')", 2)
I wouldn't need thisform.ActiveControl.
.
The Task was to Create a ToolBar According to Users Rights.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform