Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Windows colors
Message
 
To
03/07/2001 18:55:59
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00521926
Message ID:
00526591
Views:
13
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.


If we were to introduce Visual FoxBase+, would we be able to work from the dotNet Prompt?


From Top 22 Developer Responses to defects in Software
2. "It’s not a bug, it’s a feature."
1. "I thought I fixed that."


All my FoxTalk and other articles are available on my web site.


Unless specifically identified otherwise, anthing posted here is purely my opinion and may or may not reflect the policies or practices of Microsoft.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform