>>>I'm creating a Custom class to work with a grid at the same level. How can I get code into the MouseEnter and MouseLeave events of the grid at runtime? This class is meant to reside at the same level as the grid and the only known relationship between them at design time is that name of the grid is a property of the Custom class. I want all the rest of the stuff to happen at runtime.
>>
>>You can try BindEvent()
>
>I'm trying to get the code I will have in my custom class to be in the grid at runtime. Is this the right way to do it?
>
>BINDEVENT(THIS.PARENT.&lcGridName,"MouseEnter",THIS,"MouseEnter")
>
Yes, except I would better create a reference to the object without macro, e.g.
try
loGrid = evaluate('THIS.PARENT.' + lcGridName)
BINDEVENT(loGrid,"MouseEnter",THIS,"MouseEnter")
catch to loEx
endtry
If it's not broken, fix it until it is.
My Blog