N
Nigel V Thomas
Is it possible to dynamically direct a particular control's event to use a
predefined method.
For example.
I have a form which I dynamically add controls to, let's say, TextBox1,
TextBox2 and extBox3 and a module which as 3 routines, Method1, Method2,
Method3
When I dynamically add my controls, eg TextBox4, I want to choose which of
the 3 methods I want mapped to which event.
I was thinking of something like this...
..
..
..
Dim objTextBox1 as new TextBox
dim NameOfRoutine$="Module.Method2"
Form.Controls.Add(objTextBox1)
Call AssignMethodToEvent(objTextBox1.GotFocus, NameOfRoutine$)
..
..
..
Can anyone help me on this? Is this possible?
Nigel
predefined method.
For example.
I have a form which I dynamically add controls to, let's say, TextBox1,
TextBox2 and extBox3 and a module which as 3 routines, Method1, Method2,
Method3
When I dynamically add my controls, eg TextBox4, I want to choose which of
the 3 methods I want mapped to which event.
I was thinking of something like this...
..
..
..
Dim objTextBox1 as new TextBox
dim NameOfRoutine$="Module.Method2"
Form.Controls.Add(objTextBox1)
Call AssignMethodToEvent(objTextBox1.GotFocus, NameOfRoutine$)
..
..
..
Can anyone help me on this? Is this possible?
Nigel