Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can I bind events to the browse window on the fly?
Message
De
20/11/2001 06:29:31
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00583378
Message ID:
00583830
Vues:
35
I test it and it works as you describe. Unfortunetely the problem with the unreleased objref makes it unusable


Thank You very much

Dimitris

>>In another thread i read that you can bind events to the _screen object. Can something similar be done with the browse window?? Thats for quick and dirty solutions, when you dont have the luxury to make a grid in order to manipulate the events...
>>
>>Thank You
>
>Yes you can. Ex.
>local logridmonitor
>browse name loMyGrid nowait
>logridmonitor = createobject('CusGrdMonitor')
>browse last
>return
>
>define class cusGrdMonitor as Custom
>oGrid = loMyGrid
>
>procedure Destroy
>THIS.oGrid = .NULL.
>endproc
>
>procedure oGrid.Column1.Resize
>	wait window transform(THIS.Width)  && THIS is an object reference to Column1
>endproc
>
>procedure oGrid.AfterRowColChange
>lparameters nColIndex
>	wait window transform(nColIndex)
>endproc
>enddefine
>
>There is a problem with this code. It leaves an object reference somewhere to the Grid object specified in the Name clause and the Browse window remains displayed. It isn't active and you can't make it active. If you issue a CLEAR ALL, it releases it. This may have something to do with the unreleased object reference in an Assign method bug reported here a month or so ago.
>
>Because of this, I would recommend going along with Vlad's suggestion of actually using a Grid.
>
>HTH.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform