Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid rows highlighting
Message
 
À
13/07/2005 04:34:39
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9
Divers
Thread ID:
01032056
Message ID:
01032460
Vues:
22
Hi Everybody,

Thanks for your generous help, which provide me with a lot of insight in how to solve my problem. In my particular case, the cursor has filter on hence it will take a bit more effort in implementing the highlight mechanism.

David

>>Hi, I know how to highlight alternative rows in a grid by using grid.dynamicforecolor and recno(), but I am scratching my head in how to highlight every other two rows in a grid, e.g. I need to highlight row 1&2, 5&6, 9&10, etc in the grid.
>>
>>Any suggustion? TIA
>
>with no filter, no deleted, no index
>you can use recno()
>
>Then:
>
>CLEAR
>? "1-1"
>FOR RECNO=1 TO 10
> ? RECNO,BITTEST((RECNO-1)/1,0)	&& or BITTEST(RECNO-1,0) or NOT BITTEST(RECNO,0)
>NEXT
>
>? "2-2"
>FOR RECNO=1 TO 10
> ? RECNO,BITTEST((RECNO-1)/2,0)
>NEXT
>? "3-3"
>FOR RECNO=1 TO 10
> ? RECNO,BITTEST((RECNO-1)/3,0)
>NEXT
>
>
>with filter or deleted or index
>the calculation is the same, but it needs to use the order position.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform