Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Color Scheme and changing

Status
Not open for further replies.

keepingbusy

Programmer
Apr 9, 2000
1,470
0
0
GB

Can someone suggest a sollution to the following:

Our first .prg contains
Code:
_SCREEN.Themes = .F.
The client has asked for a backColor of 236,233,216 on all forms

Shapes and other background colors are also set at 236,233,216

Before anyone replies about the problems with setting particular colors (e.g. Color Blind etc), I am aware of this but this is a specific request for contunuity of all forms with a set standard throughout the eight user network.

I notice in a another thread (thread1254-1260345) that this is a similar problem to what we are experiencing.

I have painstakingly set each forms Themes property to .F.-False.

This works using Windows XP but not on older version of Windows operating systems (Windows 98 is being used with Windows 2000 Server).

It appears to me that this is a problem that cannot be resolved unless a newer operating system is installed which could be an option for the company.

My question here is, does anyone know an alternative sollution to ensure BackColor settings on forms are shown on screen?

Thank you
 
Have you tried setting the Form.ColorSource = 0 instead of the default 4
0 = Object's Color Properties
4 = Windows Control Panel.


David W. Grewe Dave
 

Hi Dave

No, I haven't tried that yet but will change the forms and see how we go.

I have changed one and noticed upon doing so, a shape on the form for example turns to white (255,255,255). I changed this to 236,233,216 which is the required setting.

By doing this, is it a definitive setting that regardless of what other schemes may be in place with the Windows settings, that if the Form.ColorSource is set to 0 and the back color is 236,233,216 then it should stay like that?

Lee
 
So your client wants to enforce a set of colors for all forms, regardless of the individual user's color settings?

I think that's a bad choice, but if that's what you want, then yeah, changing ColorSource to something other than 4 or 5 should give you full control.

As for how to do this, the right solution of course, is for all forms to be descended from a single base form class. Then you can make the change just one place. Even better, when they get dinged for ADA violations because someone can't see the colors they've chosen, you only have to fix it one place.

Tamar
 
Aslo remember that all you Class Objects on the form will have to have the same change. So the Shapes, Textboxes, Listboxes, grids , .... will have to be changed also.


David W. Grewe Dave
 
Hello Lee:

Set the form's parent class to colorsource = 0 as has been suggested above...

Now about the other controls on the form, Textboxes, etc. In their init set their backcolor = thisform.backcolor so now anytime you change the form's color the controls will change accordingly.

What the customer wants is what the customer gets... and you will be in business for a long long time
 
you can set all controls colorsource = 1 and they will inherit what you set for the form, no need for backcolor = thisform.backcolor etc. that way.

Bye, Olaf.

 

Imaginecorp

Thank you for the tip. I set the themes property to .f. and changed the colors accordingly. With regards to:
What the customer wants is what the customer gets... and you will be in business for a long long time
I tend to agree with you albeit, there could be implications for the managers of the company etc.

Whilst I don't want use this thread to discuss those issues (they have already been mentioned), I am supplying an application that the customer has specifically requested.

You could argue the point with a group policy in Windows Server 2003. Forced same color desktop background, same color scheme, no screen savers, forcing users to change passwords at certain times, need I say anymore.

(Thanks again)

OlafDoschke

Thank you for the post.
 
Hello Lee;

We DO allow the user to change the colors of the forms and controls (texboxes, grids etc etc) as well as the sizes to accomadate the visually impaired more as a service than being afraid of being "dinged". Except for the caption bar of the form (controlled by windows) the user can change any and all colors... You will be amazed at the colors some users choose.

Its really very simple. If you ever need the code/methodology let me know...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top