Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid highlighter
Message
From
26/08/2004 06:51:02
 
 
To
26/08/2004 05:48:47
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00936521
Message ID:
00936535
Views:
24
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
Previous
Reply
Map
View

Click here to load this message in the networking platform