Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Windows colors
Message
From
04/07/2001 10:37:58
 
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00521926
Message ID:
00526677
Views:
13
Thanks Andrew

I'll appreciate any info or guidance order to get to such information.

Oscar

>Hi Oscar,
>
>Here's a bit of code from the init event of one of my grid base classes:
>
this.setall("DynamicBackColor", "iif(recno() = this.nRecordNumber, EVAL('RGB(' + SUBSTR(RGBSCHEME(15, 6), AT(',', RGBSCHEME(15, 6), 3) + 1)), EVAL('RGB(' + SUBSTR(RGBSCHEME(15, 2), AT(',', RGBSCHEME(15, 2), 3) + 1)))", "Column")
>this.setall("DynamicForeColor", "iif(recno() = this.nRecordNumber, EVAL(LEFT(RGBSCHEME(15, 6), AT(',', RGBSCHEME(15, 6), 3) - 1) + ')'), EVAL(LEFT(RGBSCHEME(15, 2), AT(',', RGBSCHEME(15, 2), 3) - 1) + ')'))", "Column")
>This sets the grid highlight to match the user's windows colour scheme preferences.
>
>I'm pretty sure I got this from a presentation Lisa Slater-Nicholls did here in Sydney in about 1993 or 1994. Your assumption that colorscheme 15 is the windows colours is correct. I'm pretty sure that the info as to which color pair matched which interface element was in her presentation, but I'm not in my office so I haven't got the notes to hand. I did look in the Fox2.6 help file, but there's no additional info there.
>
>Cheers,
>
>Andrew
>
>>Thanks for your help. Sorry for not explaining myself correctly. I’ll be using a couple of ActiveX objects to show some data and I’ like to set the background according to the windows colors. One of the tools which inspired me to do this is the Sidebar that appears on applications like Outlook and Paint when you click “Save As” an the browse-Dialog box appears.
>>
>>The background of that SideBar changes depending on your Windows appearance (I guess upon the “Aplication Background” color).
>>
>>I’ve seen the use of RGBSCHEME on grids to make their background the same color of the of the form’s background:
>>
>>EVAL("RGB("+SUBSTR(RGBSCHEME(15,1),AT(",",RGBSCHEME(15,1),3)+1))
>>
>>This make me conclude tha the first parameter (15) corresponds to a windows setting and the second (1) to one of the windows elements (like “Application background”).
>>
>>My question: Is there a table or any source which explains which color scheme corresponds to which element(s)?
>>
>>Regards and thanks again.
>>
>>Oscar Corte>>Is there an article or any other source where I could get information about windows colors and how to apply functions like Colorscheme()?
>>>>
>>>>
>>>>I'll appreciate any hint about it.
>>>>
>>>>Regards
>>>>
>>>>Oscar Corte
>>>
>>>
>>>Leave all the color settings in VFP at their default and your application will automatically take advantage of the user's color settings.
Previous
Reply
Map
View

Click here to load this message in the networking platform