Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid
Message
De
07/02/1999 13:40:05
 
 
À
07/02/1999 13:32:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Re: Grid
Divers
Thread ID:
00184821
Message ID:
00184879
Vues:
20
>Again, i am going to highlight the whole row while click on the cell, is there any way to hightlight the specific number of column e.g. column 2-4

You can use the column's dynamic backcolor property to do this. For this, you need a custom grid property that keeps track of the current row, so the column.DynamicBackcolor property will have something to compare with when highlighting the row.

Here is some code from my grid class:

Grid.AfterRowColChange
LPARAMETERS nColIndex
THIS.CurRow = RECNO(THIS.RecordSource)
THIS.Refresh()

where CurRow is the custom grid property I spoke of above.

Then, for any columns that you want highlighted when the user is on its row, set the column.DynamicBackColor property to somehing like:

IIF(this.CurRow = RECNO(THIS.recordsource), 255, 16777215)

htis will make that column turn red in the current row. If you want the entire row to turn red, put something like the following in the grid.init:

THIS.SetAll("DynamicBackColor","IIF(this.currow = RECNO(this.recordsource), 255, 16777215)","Column")

THIS.SetAll("BackColor", 255,"textbox")


I hope this helps.
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform