Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Programatically changing event handler
Message
 
À
14/09/2005 11:05:40
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Versions des environnements
Visual FoxPro:
VFP 8
Divers
Thread ID:
01049466
Message ID:
01049483
Vues:
8
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform