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 08:14:41
 
 
To
29/06/2001 05:13:25
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00523476
Message ID:
00525100
Views:
16
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.

>>
>>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.
Will Jones
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform