Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting the same method for all fields in a grid
Message
From
29/06/2001 09:53:34
 
 
To
29/06/2001 08:14:41
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00523476
Message ID:
00525167
Views:
14
>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform