I want to develope a color scheme for a project. I looked up the information on creating color schemes but I can't find anything that tells me how to corrolate the color pairs to what is to be displayed. Can you tell me where to look?
A lot of the colors for any Windows application come from the user's Control Panel. The only things you can really change are BackColor and ForeColor properties for individual controls. These are done using RGB() pairs specifying the amount of Red, Green, and Blue (0-255 each).
If one uses the scheme or rgbscheme. The color pairs for color scheme n are are returned. I read that, with the exception of a couple reserved color scheme numbers, I can set up my own color sets which consist of 10 pairs of colors.
From my experience with earlier versions of Foxplus/pro these color pairs represent different displays on the screen ie - foreground, background, highlighted foreground/background, disabled forground/background etc. From my reading, I thought I could develope a standardized color scheme for a project so that I didn't have to set all the colors for each control.
Assuming that this is correct, I need to know, positionally, what display each color pair affects.
If you are working in VFP, the "standard" way to go is to subclass the VFP base classes.
I created a class library called "baseclasses" and created a control of each type that I use in my project. I then added this class library to my Form Controls toolbar (Tools/Options, Controls tab, select Visual Class Libraries and click Add...).
If you create all of your forms and controls from your classes instead of the VFP Base Classes, then any changes (color, for example) that you make to your class will automatically happen everywhere in your project. This is known in OOP as "Inheritance". I highly recommend this approach, and must give credit to Ramani for posting it oh so long ago. )
I can/will develope the controls with the cosmetics that I like but does no one use this color scheme thing? Seems odd not to be able to find out how to use it. Just that it exists.
I have no idea...I always assumed the ColorScheme commands were remnants from the old FoxPro for DOS days. I tried reading up on them when I came across them in the MSDN, but they were too confusing and I gave up. LOL
Color schemes are definately a left over from the dos days, and the manual used to specifically say not to use them except as a backward compatability thing. Frankly even in the dos days they were a huge pain.
It is considered very poor windows style to override the users windows color settings.
BTW one thing I do to check that I have not accidently set a control permanently to the default silver color is to alway have my windows colors set to something other than the default. It makes those objects stick out like sore thumbs. I can't even begin to count how many programs I have seen with a couple of labels or a text field 'stuck' to the wrong color.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.