Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Row Select
Message
From
12/07/2000 05:54:24
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00390749
Message ID:
00391115
Views:
20
Hi Kelly.

>> I would like to click or double click on a row in a grid and have the entire row background chg color so the user is clear which row is selected. Is there a simple way to do this. <<

This code in the grid class's init (after adding a custom nRecNo property to your grid class):
This.nRecNo = RECNO( This.RecordSource )
This.SetAll( 'DynamicForeColor', ;
	'IIF( RECNO( This.RecordSource ) = This.nRecNo, RGB( 0, 0, 128 ), RGB( 0, 0, 0 ) )', 'COLUMN' )
This.SetAll( 'DynamicBackColor', ;
	'IIF( RECNO( This.RecordSource ) = This.nRecNo, RGB( 0,255,255 ), RGB( 255, 255, 255 ) )', 'COLUMN' )
And this in the grid class's AfterRowColChange:
Thisform.LockScreen = .T.
This.nRecNo = RECNO( This.RecordSource )
This.Refresh()
Thisform.LockScreen = .F.
Marcia
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform