Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setting the same method for all fields in a grid
Message
De
26/06/2001 15:42:06
Gerry Schmitz
GHS Automation Inc.
Calgary, Alberta, Canada
 
 
À
26/06/2001 08:09:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00523476
Message ID:
00523803
Vues:
12
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform