Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Highlight row in grid?
Message
 
 
To
06/01/2003 14:59:04
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00738516
Message ID:
00738600
Views:
20
Here's basic code for current row highlight. It assumes that your grid class has property nRecNo.
* Grid Init
This.nRecNo = Recno(This.RecordSource)
This.SETALL("DynamicBackColor","IIF((THISFORM.nRecNo=RECNO(This.RecordSource))," + ;
   "RGB(0,0,255),RGB(255,255,255))","Column")
* Grid AfterRowColChange event
This.nRecNo = Recno(This.RecordSource)
>Now, I know there are a couple of ready made classes out there, but I'd like to try to do it myself.
>
>I had something like this in the After RowColumnChange method in mind
>
>
>* Reset the color to white
>THIS.SETALL('DynamicBackColor','RGB(255,255,255)','Column')
>FOR i=1 TO THIS.COLUMNCOUNT
>   THIS.COLUMNS(i).CurrentControl.BackColor = 'RGB(192,192,192)'
>   * Except there is no such thing as the CurrentControl.BackColor property
>   * and I'm at a loss as to how to change the CurrentControl's BackColor
>ENDFOR
>
>
>TIA
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform