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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Background Color - Themes Recommendation

Status
Not open for further replies.

Auguy

Programmer
May 1, 2004
1,206
US
Does anybody have any recommendations / best practices as to what the setting should be for themes? Tamar already suggested leaving it alone and letting Windows handle the colors. That sounds good, but I know there is a a problem setting the background color on the pages of a Page Frame unless themes are off.

Thanks,

Auguy
Northwest Ohio
 
I know there is a a problem setting the background color on the pages of a Page Frame unless themes are off.

Are you sure about that? I always have Themes off, but I have often changed the page's BackColor.

On your more general point, I do tend to choose my own background colours, especially for data-entry controls. This is partly because I want a better contrast between read-only date-entry fields and those that are read-write. Before I did that, I found that users couldn't easily see whether a form was in edit mode because the default colours for read-only and read-write fields were too similar.

That said, I'm aware that this isn't the recommended practice. As Tamar says, it's better to let the user make their own choices in Control Panel. Actually, I follow that rule most of the time. It's just that there are certain times when I prefer to decide these matters for myself.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Thanks for the advice. I have always set the background colors for most everything. I even use a different background color to indicate which text box the cursor is in setting and restoring it's value in got focus and lost focus. I just created a test form in VFP9 SP1 with a page frame and set the background color to red on the first page. Until I set themes off at the page frame or form level, nothing changes. Maybe SP2 fixes this or possibly I have some other setting messed up. I have been reluctant to install SP2 due to some of the problems I've read about. But I think most of those were due to not using the proper runtimes.

Auguy
Northwest Ohio
 
Auguy,
I can confirm: Themes on = no possibility to change the background colour of your Page of a Pageframe. (That's where "themes" are for: to make the form in the themes colors the user selected for his Windows OS.)

Now if you want themes=on and still change the backcolor, I suggest you add a picture, a 1 bit With, Heigth acording to your PageFrame ,gradient stripe, will do. Dont forget to set the strechting.
Good luck.
Regards,
Jockey(2)

jockey.gif
 
I must be missing something here.

In my main program, I have _SCREEN.Themes = .F. I set the BaackColor property of one of the pages in a pageframe to red. I can see the red page when I run the app.

If I change _SCREEN.Themes to .T., I get exactly the same behavior.

Auguy and Jockey, what are you doing that's different?

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Still confused!!!! Just tried it again on a form with only a textbox and a page frame on it. The backgound color will not change on the pages unless themes is set to .F. I am using VFP9 SP1. Are there any other settings in VFP or XP that would cause this behavior?

Auguy
Northwest Ohio
 
Hi,

Mike: have put the property Themes=.T. on myPageFrame and the backcolor of any of its Pages to any color, see what happens?

Auguy: What is the problem? Themes property is to make the Pages of a Pageframe appearance according to the XP-Themes. If you dont that that than change the Themes property to .F., h/e if you want a Themes appearance but dont like your endusers to change the color than you shall have to make your own background but remember you shall have than to put Themes to .F.

Best regards,

Jockey(2)
 
No real problem, it's strange that I can set the backgound color on a form and it displays whatever color I have chosen for the background color no matter what the settings for themes. But, the page background color doesn't work that way for me. I have to set themes OFF to see the background color I have picked. Just seems to be inconsistent and I was wondering if I was doing something wrong or I had some settings screwed up

Auguy
Northwest Ohio
 
Mike;

If I change _SCREEN.Themes to .T., I get exactly the same behavior.

Its Not the Screen Themes, but the Page Frame's Themes. It Themes for the page frame is .t. You cannot change the pages back color... No matter what you set the back color as its always some light yellowie grainy color.

The guys who design colors at Microsoft seem to have no idea where colors are considered...

Wait till you see what Vista Ultimate does its even worse...
 
OK, I know I'm out-numbered three-to-one here, but I still can't see it.

Could someone try running this code and tell us what you see:

Code:
PUBLIC oForm
oForm=NEWOBJECT("TestForm")
oForm.Show

DEFINE CLASS TestForm AS form

ADD OBJECT pageframe1 AS pageframe WITH ;
  PageCount = 2, ;
  Themes = .T., ;
  Page1.BackColor = RGB(255,0,0)

ENDDEFINE

Unless I'm going crazy, the pageframe has Themes on, and the page's backcolor has been changed to red. I swear that when I run this, I can see the first page is red.

I've tested this in VFP 7.0, 8.0 and 9.0 SP1.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Mike,

I ran your code with _SCREEN.Themes both .T. & .F.

When _SCREEN.Themes is .T., I don't get a red page but when _SCREEN.Themes is .F., I do get a red page.

I've got SP2 installed by the way.

Stewart
 
I get exactly the same behavior as Stewart. I have VFP9 and SP1. Is there a VFP or Windows configuration setting that could be causing this diference?

Auguy
Northwest Ohio
 
Stewart,

I thought you had hit on the right answer. I noticed that _SCREEN.Themes was .f. in my property window (don't know why).

So I explicitly set _SCREEN.Themes in the code that I posted above (the first line). But I tried setting it both .T. and .F., and I am seeing the red page in both cases.

I suspect this is caused a setting in Windows rather than anything to do with VFP.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My Visual FoxPro site: www.ml-consult.co.uk
 
Mike,

I'll ask the "is there gas in the car?" question:

Are you overriding _Screen.themes via Form.themes or pageframe.themes?
 
Mike,

You are correct:

_screen.themes = .t. TestForm.Themes = .f. -> pagecolored
_screen.themes = .f. TestForm.Themes = .f. -> pagecolored
_screen.themes = .f. TestForm.Themes = .t. -> pagecolored
_screen.themes = .t. TestForm.Themes = .t. -> pagethemed

sorry for confusion, but now al clear, right?

Regards,

Jockey(2)

P.S. greetings to Dan who smelled the correct answer!
 
Thanks to all for the posts & discussion.

Auguy
Northwest Ohio
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top