General information
Category:
Coding, syntax & commands
>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.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only