Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid DynamicBackColor Using A Method Instead of IIF?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00148063
Message ID:
00148201
Vues:
21
Hi David,

>That exact thing works great for me. For the column I have DynamicBackColor set to thisform.StageColor(recno("stackstages")) on the property sheet. Ans the form method looks like:
>
>
* this method provides the colored cells for the grdStages
>* they match the colors of the pages from the stack ticket
>
>lparameter pnRecno
>
>do case
>   case ( pnRecno = 1 )            && Yard
>      return rgb( 255, 255, 255 )
>   case ( pnRecno = 2 )            && Pre Dryer
>      return rgb( 255, 255, 0 )
>   case ( pnRecno = 3 )            && Kiln
>      return rgb( 255, 128, 255 )
>   case ( pnRecno = 4 )            && Cooling Shed
>      return rgb( 255, 128, 0 )
>   case ( pnRecno = 5 )            && Plant
>      return rgb( 255, 255, 164 )
>   otherwise
>      return rgb( 192, 192, 192 )
>endcase
>

In this case it should be faster to use an array with 5 rows and then use the following expression:

IIF( BETWEEN(RECNO(),1,5), Thisform.aColors[RECNO()], RGB(192,192,192) )

Christof
--
Christof
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform