Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Programatically changing event handler
Message
 
To
14/09/2005 11:05:40
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Environment versions
Visual FoxPro:
VFP 8
Miscellaneous
Thread ID:
01049466
Message ID:
01049483
Views:
10
Murat,

Something like this in the Init of the form:
this.AddObject('linMain', 'Line')
this.linMain.Move(10, 10, this.Width - 20, 1)
this.linMain.Visible = .t.
BINDEVENTS(this.linMain, 'Click', this, 'LineClick')
You will need to add a custom method called LineClick to the form (or whatever you want to name it) and in the Destroy method of the form, do something like this:
UNBINDEVENTS(this)
HTH,
Chad

>i am trying to add object to my from with ThisForm.AddObject("Line")
>
>for ex.
>
>i need to assign event handler to this object. For example mouse clicked event.
>
>how should i do it
_________________________________
There are 2 types of people in the world:
    Those who need closure
Previous
Reply
Map
View

Click here to load this message in the networking platform