Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Setting the same method for all fields in a grid
Message
From
26/06/2001 15:42:06
Gerry Schmitz
GHS Automation Inc.
Calgary, Alberta, Canada
 
 
To
26/06/2001 08:09:55
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00523476
Message ID:
00523803
Views:
11
>the doubleclick method for these field types could read something like
>
>if pemstatus(_screen.activeform,'GridDoubleClicked',3)='Method')
> thisform.GridDoubleClicked
>return
>
>but that seems an awful long way round to do it.

I don't know if your concern is having to subclass the TextBoxes, coding PEMSTATUS, or both.

Subclassing is always a good idea IMO; as far as PEMSTATUS, I frequently code "virtual" methods/events ... ie. base methods/events that do "nothing" and are only implemented in the subclasses.

In your case, I would add a "virtual" .GridDoubleClicked() event to the "base" Form you typically use for containing Grids; eg. something like ...
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