Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Alternate color columns in a Grid?
Message
De
05/11/2004 16:19:05
Calvin Smith
Wayne Reaves Computer Systems
Macon, Georgie, États-Unis
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Alternate color columns in a Grid?
Divers
Thread ID:
00958685
Message ID:
00958685
Vues:
75
I am using these commands to color the current row and alternate the color in 1 column of a data grid:

with thisform.grid1
.nRecNo=recno('pdfs') .setall('dynamicbackcolor','iif(recno(this.recordsource)=this.nRecNO,rgb(192,192,192),rgb(255,255,255))','column')
.column4.dynamicbackcolor='iif(mod(thisform.grid1.activerow,2)=1,rgb(255,255,0),rgb(255,128,192))'
.SetFocus()
endwith

The reason I am using Thisform.grid1.activerow to set the dynamicbackcolor rather than the .nRecNo property is that this data is not in recno order and cannot easily be made to be in recno order.

All works well until the user clicks to do a page down on the scroll bar. Column4 then becomes 1 color and stays so until the user either clicks on the grid or does a key event to move the record pointer in the grid.

I have put the .column4.dynamicbackcolor line of code in the grids scrolled event, but no joy.

Any suggestions?
A problem is a problem only as long as it has a possible solution. Lacking that, it becomes a FACT!
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform