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

Display backcolot on page frame

Status
Not open for further replies.

OldtTimerDon

Programmer
Oct 6, 2012
34
US
I'm using FoxPro9 and trying to display 0,255,255 as the backcolor on one of the three tabs of a pageframe. My color source is 4-Windows colors. All the controls on the tab are transparent. Why am I not getting a blue background? I've gotta get more books for my FoxPro library...
 
This is because of windows themes.

In todays windows it's advisable not to use background colors, but icons for the pages to let the user decide the overall look. If you insist you can turn off themes in VFP overall, if you eg set _screen.themes = .F.

Bye, Olaf.
 
This is because of windows themes.

Olaf, are you sure about that? I frequently set the BackColor of a page, and as far as I know it is not affected by _SCREEN.Themes.

If you set the page's BackColor to RGB(0,255,255), and leave the page's ColorSource set to 4, I can't see why you shouldn't get a blue page (or cyan, to be exact). There must be some other setting at work here.

Just to be clear, Don. We are talking about the background of the entire page, not just the tab?

Mike



__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
The page color is the tab color, too. There is no seperate object or color property for the tab, so in the end I'm quite sure. I am able to set the page color with _screen.themes=.f.

Bye, Olaf.
 
Mike,

do you perhaps have set form.themes=.f. or pageframe.themes=.f. or page.themes=.f.

You can do that on many levels, I didn't look into which controls or subcontrols have the themes property, but a UI looks odd, if some things are themed and others not. I gave the _screen.themes for an overall switch.

Bye, Olaf.
 
Olaf,

I normally set _SCREEN.Themes to .F. by default, at the start of my main program.

However, in order to help answer Don's question, I set Themes to .T. at _SCREEN, form and page frame level (there is no Themes property for the individual page). In all cases, I was able to set the BackColor as expected.

I wonder if the problem is caused by the setting of the page's BackStyle. If it is set to Transparent, then the BackColor won't show.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Mike,

how is your windows setting? Do you have aero active at all? How about SYS(2700)? I also remember there is a difference between IDE and EXE, especially if you changed the property of the VFP9 shortcut to turn off aero for working in the IDE.

Bye, Olaf.

 
Olaf and Mike:
It looks as though I created an interesting exchange. For the record, I changed pageframe.Themes to .f. and it accomplished what I desired.
Thank you, Olaf.
 
Don, I'm surprised that Themes was the culprit (I was beginning to convince myself that it was BackStyle that needed changing). But I'm glad you've got it solved

Mind you, I did a quick Google search, and found this post from some fool who usually doesn't know what he's talking about:

keep in mind that a page frame's BackColor is only visible if the page's Themes is .F.

Ah, well ....

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Hello,

I can just confirm, that pageframe backcolor display is influenced by the pageframe.themes property. The form themes property can be easily se to .t. and the pageframe background would work.

PS: Took several days for me to discover when I needed it. Those times I had not idea about Tek-tips :)
 
Fido007,
Thanks for your response to my solved problem. Welcome to Tek-tips, a great resource and a great bunch of problem helpers!
Senile Senior Don,
Sun City, AZ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top