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 strongm 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 2

Status
Not open for further replies.

ravicoder

Programmer
Apr 29, 2006
30
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
 
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:

You're still out there hittin' it, Greg?
 
Thanks all for the feedback

I have implemented a simple button group and a pageframe with tabs off to simulate menu and relevant pages being activated. While not as good looking as ggreen's above screenshot, it does the job for me.

Regards
Ravi
 
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
I suggest you to always use a library of base classes that way you can set the .Themes property to .F. And you won't have to do it again.
 
I suggest you to always use a library of base classes that way you can set the .Themes property to .F. And you won't have to do it again.
Is there any way to preset some native objects in VFP?
I would really like to add some properties of the columns and headers of a grid to the favorites page.
It is annoying if you have to constantly jump around in design mode to set alignment, column names, comments and other properties.
The same effort naturally also applies to text and edit objects
 
Just sub-class the VFP classes.
The way you do that is, open the class, resave it with a new name into a class library like "girdbase".
Then open the class, right click the property/method you want and "Add to Favorites".
Now when you place that object on a form, the favorites will be there. Use your base classes instead of VFP base classes, this has loads of other advantages, if you're not doing that already.
If you are, then just right click the property/method and "add to favorites".
 
Scott has a good anser, but besides base classes you preset instead of using native classe and besides putting properties into the favorites tab of the properties window, you can multiselect objects and set common properties at once, without going through all objects.

Specifically about grids you can design column classes and use them instead of the native column.
 
Is there any way to preset some native objects in VFP?
I would really like to add some properties of the columns and headers of a grid to the favorites page.
It is annoying if you have to constantly jump around in design mode to set alignment, column names, comments and other properties.
The same effort naturally also applies to text and edit objects
You can open foxcode.dbf and search for “Anchor” and just do the same.
This method is limited to your insistence on using the VFP base class.
 
Just a general advice - Ein Terraner - your question is hijacking the thread, add your own new thread to discuss a new topic. The original question ravicode was about a pageframe on a form, your question seems to me related to the properties window of the IDE and it's pageframe and tabs. That's only visually related. but not thematically.
 
your question is hijacking the thread,
I'm sorry that I copied the wrong text here. I had actually prepared this for another post, but it's not quite finished yet. I must have had a short circuit in my thinking (too tired).

My question about Pageframe/Page should be this:

PageFrame AND it's Pages should have some properties and methods, like my containers have, for example, so that I can preset them at design time.
here a sample nondef-properties/methods in a containerEdit_Container.jpg and my favoritesEdit_Cont_Fav.jpg
 
EinTerraner....
You're kind of breaking my brain here. I don't understand the question in the context of the example. Your example clearly already has a "sub-classed, base class", and in one tab you are showing all properties, in another you are showing favorite. You can make any property a favorite, save that class, and they will still be there. There are custom methods you've added (they are always at the bottom of any tab they apply to, and are always all lower-case and in alpha order, like those in your first example).

I would suggest two things:
1) Start a new thread, with a clearly stated problem, and what you are trying to achieve
2) Your "Question about Pageframe/Page" as Chris points out has nothing to do with these properties windows, nor the object "edit_container". So back to point #1, make sure it's clear what you are trying to achieve. I appreciate that knowing the answer you are seeking and the way you are constructing the question may not be related.

To that point #2, I think much of the confusion is, you know what you want to ask, but the way you are constructing the question, and what it asks is incongruent with the examples you are providing. SO knowing what you are trying to achieve is far more important than the question you are asking, because it seems to be in contradiction with the examples you provide.
We are all willing to help you get there, but please construct it in single, specific thread, and more about what you want to happen/behavior of the system or application, and less about "how do I do <something>", in a convoluted context.

Please don't take this as a criticism. It's not intended to be.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top