Rajesh Karunakaran
Programmer
Hi Friends,
In a form, I have created a few checkbox controls at runtime. I used BINDEVENT to map the checkbox's Click event to a method in the form itself. Below is the code generating the checkboxes (just a sample of what I am doing)
Along with these, I have some labels in the form created at design time.
Now, when I click on the label, it appears that the event of the checkBox is fired and the 'object_event_handler' method is being called.
Any clue?
Rajesh
In a form, I have created a few checkbox controls at runtime. I used BINDEVENT to map the checkbox's Click event to a method in the form itself. Below is the code generating the checkboxes (just a sample of what I am doing)
Code:
FOR c = 1 TO 6
loName = 'chk_' + ALLTRIM(STR(c))
thisform.AddObject(loName, 'CheckBox')
lo = EVALUATE('thisform.' + loName)
WITH lo
.left = 5
.top = c*15
.BackStyle = 0
.Caption = ''
.Visible = .T.
.Value = .F.
ENDWITH
=BINDEVENT(lo, 'Click', thisform, 'object_event_handler', 1)
ENDFOR
Along with these, I have some labels in the form created at design time.
Now, when I click on the label, it appears that the event of the checkBox is fired and the 'object_event_handler' method is being called.
Any clue?
Rajesh