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!

Help with visual foxpro pageframe 1

ravicoder

Programmer
Apr 29, 2006
26
0
1
IN
Hi all

can someone please guide me how to change look - back color, font size etc. of individual pages of a pageframe. tried changing properties but nothing is changing
e.g. I have a pageframe containing 4 pages, if I click on a tab caption that caption font should change and that particular page back color should change and so on

is there some other setting required?

Thanks in advance
Ravi
 
Hi,

maybe you have themes = .t. in form propertys, set it to .f.
Yes... that's definitely right.

I always felt that feature was a bad idea. Microsoft's vision was that users would be able to take advantage of the themes they used in the control panel, but that was at the expense of programmers setting their own colors. They really should've made .f. the default.
 
When it comes to pageframe properties that affect the appearance of the control, there are a number of inter-dependencies. In particular, SpecialEffect doesn't work if Tabs is .T. (which is the default). Also, BorderColor only applies if SpecialEffect is set to "flat". There are other examples as well. These are all documented in the Help.

Mike
 
Yes... that's definitely right.

I always felt that feature was a bad idea. Microsoft's vision was that users would be able to take advantage of the themes they used in the control panel, but that was at the expense of programmers setting their own colors. They really should've made .f. the default.
The point is that it's the user's computer and the user should be able to control that stuff. Most essentially, when a user has some visual impairment (including color blindness, which is pretty common), they MUST be able to override the programmer's choices, or the application may be unusable for them.

Tamar
 
Thanks Everyone

I set the pageframe.themes to .f. and it gave me the desired results. Now the user will be aware which page is currently active as I have set a different backcolor when tab is clicked

Thanks again
 
Hello,

glad that it helped you.
I suggest to test setting only the caption (we use bold) and setting the backcolor of the active (has focus) textbox , we do it in all our forms. Our customers found that less "distracting" then setting backcolor of the page. But thats only a personal opinion of course.
 
The point is that it's the user's computer and the user should be able to control that stuff. Most essentially, when a user has some visual impairment (including color blindness, which is pretty common), they MUST be able to override the programmer's choices, or the application may be unusable for them.

Tamar
I understand the intention, but the way Microsoft implemented isn't quite as effective as it should be because it only seems to change a handful of features in VFP. For example, it doesn't control fonts.

As a rule of thumb, I prefer to have as much control as possible within my code and give my users control of as many settings as possible, so my version of supporting ADA compliance goes way beyond what turning Themes on could ever do.

So, I allow them to change things like the default background and foreground colors as part of their user login settings, and in the case of grids, I also let them preset the default font names and sizes and give them +/- buttons above the grid. In theory, I could also give them the choice to turn Windows Themes on/off as a system setting and have your base classes allow them to turn Windows Themes on, but giving them control within the program gives them even more control. You'd be amazed at the variety of crazy colors and font choices my users make.
 
Thanks all

I have created my main application menu to the similar look and feel of the office ribbon menu using a pageframe. I wanted to let the user know which section is active currently on screen, hence I changed the backcolor of the relevant activepage to a different color. Works like a charm

Thanks again
 
In my application, I use a commandgroup button and a pageframe class together. The pageframe is set to hide the tabs at runtime. I have customized the commandgroup as my own class to control the highlighting of the buttons. The buttons in the commandgroup each correspond to a page in the pageframe. In the pageframe, each page contains custom class buttons for the functionality. In the commandgroup InteractiveChange method I set the active page based on the commandgroup button selected:

Code:
thisform.clsMenuBar.ActivePage = this.Value

See the screen shots:

Design-Time

1.jpg

Run-Time:

2.jpg
 

Part and Inventory Search

Sponsor

Back
Top