Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Windows colors
Message
 
À
03/07/2001 18:55:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00521926
Message ID:
00530367
Vues:
18
>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)?

There is a good reference for RGBSCHEME(): the Foxpro 2.6 help files; It's not what you expect... RGBSCHEME(nScheme,nPair) is the same as SCHEME(nScheme,nPair)... which is a somewhat clumsy but workable way of setting up color schemes that was created in FoxPro Dos; The idea is there are a given number of color schemes (24) and each scheme has 10 color pairs. Scheme 1 is used for user windows, scheme 2 is used for user popups, scheme 5 is used for Error windows (I think), etc. These don't necessarily map to Windows colors.

What is kinda funny is this mention in the VFP help topic "Colors Overview":
Visual FoxPro offers a sophisticated set of commands for full control of colors.

By default, Visual FoxPro takes its colors from the operating system's Control Panel settings. At startup, the Control Panel colors are mapped to the Visual FoxPro default color schemes. You can set colors directly with the SET COLOR commands or interactively in the Control Panel. Refer to your Macintosh documentation for more information about setting colors with the Control Panel.

By default, Visual FoxPro takes its colors from the operating system's Control Panel settings. At startup, the Control Panel colors are mapped to the Visual FoxPro default color schemes. You can set colors directly with the SET COLOR commands or interactively in the Control Panel. Refer to your Windows documentation for more information about setting colors with the Control Panel.
(sic: the help really does have both paragraphs; so anyway, you can take the actual windows colors from the schemes before changing the schemes in your code, or maybe they are in schemes 13 thru 16 which cannot be changed in VFP.)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform