Information générale
Catégorie:
Gestionnaire d'écran & Écrans
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement