Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Highlight entire row on grid
Message
From
07/01/2003 17:15:43
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00738413
Message ID:
00739079
Views:
41
Hi Nadya.

I was trying to find your message how to determine Windows color scheme to use in highlighting (to append to your response), but didn't succeed. May be you can better find this message in yours? Or re-post it again, sorry?

You can use the WSH like so:
loShell = CreateObject( 'WScript.Shell' )
lcBgColor = loShell.RegRead( 'HKCU\Control Panel\Colors\Hilight' )

*** This returns the RGB values of the highlight color as space delimited *** set of values. In order to use this to set the background color for the *** current grid row, call this code from the grid’s Init():

lcBgColor = 'RGB( ' + STRTRAN( lcBgColor, ' ', ', ' ) + ' )'
lcNormalBg = loShell.RegRead( 'HKCU\Control Panel\Colors\Window' )
lcNormalBg = 'RGB( ' + STRTRAN( lcNormalBg, ' ', ', ' ) + ' )'
This.SetAll( 'DynamicBackColor', ;
	"IIF( RECNO( This.RecordSource ) = This.nRecNo, " + ;
     lcBgColor + ", " + lcNormalBg + " )", 'COLUMN' )
Or, if you don't like the WSH, you can always use the WinAPI GetSysColor() function, but I don't have the syntax for that at my fingertips
Previous
Reply
Map
View

Click here to load this message in the networking platform