>Noticed this thread and thought i'd stick my oar in (I don't know who originally suggested this)...
>
>The technique demonstrated below to my mind should not call a method on thisform
>
>A Custom method should be created on the grid which gets called.
>In the textbox duobleclick even t
>
>This.Parent.Parent.GridDoubleClick(this)
>
>This follows OO guidelines for encapsulation (ie each object only has to know about itself)
>
>This also gets round the problems you would encounter if you have more than 1 grid on a form.
Thats fair comment Will.
You are quite right and I will do it that way if anyone can figure out an easy way of ensuring the textbox double click event is populated automatically in a way I can use with the gridbuilder.
I don't want to write my own gridbuilder (especially since Nick's click transparent class provides such an easy way to handle all this)
I dont save much labour by avoiding populating the textbox events anyway.
I am just lazy I guess :)
>
>>>
>>>PROC .GridDoubleClicked
>>> LPARAMETERS oTextBox
>>> * Virtual.
>>> RETURN .T.
>>>
>>>
>>>In the TextBox Class, I would code:
>>>
>>>
>>>PROC DblClick
>>> THISFORM.GridDoubleClicked( THIS )
>>>
>>>
>>>In the above case, there is not need to code PEMSTATUS. If a Form in question does not wish to respond to .DblClick (from a TextBox), then that Form simply would not override (ie. "implement") .GridDoubleClicked.