Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid highlighter
Message
De
26/08/2004 06:51:02
 
 
À
26/08/2004 05:48:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00936521
Message ID:
00936535
Vues:
23
Hello Dear,

You can make current row highlight in grid with following examples

Example 1

Put following codes in afterrowcolchange of grid

ThisForm.grid1.SetAll("DynamicBackColor", ;
"iif(ThisForm.grid1.activerow = This.activerow, RGB(0,255,0);
,RGB(255,255,255))", "Column")

Example 2

Create a custom form property say CurrentRec and initialize it to zero. At your form's INIT, add this line,
ThisForm.Grid1.SetAll("DynamicBackColor","IIf(ThisForm.CurrentRec = RecNo(),RGB(0,255,255),RGB(255,255,255))","Column")

Note: You can change RGB(0,255,255) to any color you want. Then in the grid's AfterRowColChange Event, add the lines:

This.Refresh
ThisForm.CurrentRec = IIf(ThisForm.CurrentRec # RecNo(),RecNo(),ThisForm.CurrentRec)


Example 3

Put the following codes at the init of form

IF DODEFAULT()
THIS.ADDPROPERTY("nCurrRec",RECNO())
THIS.SETALL("DynamicBackColor", "IIF( Recno();
=this.nCurrRec,RGB(14,225,247),RGB(255,255,255))", "COLUMN")
ENDIF

Put following codes in afterrowcolchange of grid

if dodefault( nColIndex)
this.nCurrRec = RECNO()
this.Refresh()
ENDIF

If you find any problem, do contact me
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform