Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I catch the right click in a grid when ...?
Message
De
07/06/1999 03:23:33
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00226556
Message ID:
00226971
Vues:
23
>>Renato,
>>
>>Subclass the grid and write whatever code you want.
>
>Ok thanks you're right,
>but when you specific ColumnCount in a grid class, the develpoers cannot use this grid whit less columns of the class (control in a class cannot be remove at design time) so what I've to do ? If I create a grid class with few columns developers have to rewrite the method of new columns and we return to the start point, or maybe have I to create differents versions of the grid class with 2,3,4 ... 10,11,12 columns ? I think my library will be very fat and heavy
>
>Any other suggestions ?

Many frameworks have a grid class that starts with 10 or more columns, and a have a custom property for the actual column count. At design time, only configure as many columns as you need, and at runtime, remove columns from the top until you only has as many columns as you need.
Use something like:

FOR i = 10 TO (THIS.nActualColumnCount + 1)
loColumn = EVAL("THIS.Column" + ALLTRIM(STR(i)))
THIS.RemoveObject(loColumn)
ENDFOR
Erik Moore
Clientelligence
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform