INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

PageFrame Trickery

PageFrame Trickery

(OP)
Hi All,
Many of you know I've been working on a ribbon bar implementation, and so far it's all gone pretty well. Today I was trying to implement a new behavior in the bar, and ran into something weird.

So, my assumption was that if you made the pageframe height = 1 or 0 that it would effectively have the appearance of the page from being "invisible". The idea being that some people don't want the ribbon bar to stay "in the way" while they're doing other stuff, and only want it to pop down when they go to the topline menu, or maybe choose to turn it on and off.

So I built a routine that slowly collapses the pageframe down to 1 pixel high. (This is good, as it helps maintain the appearance of the bottom "bar" of the top line menu.

But then I discovered, where I have "container" objects on the various pages, they do not "collapse" with the page frame itself. So if I go to another page, those icons (which are in container) remain on the main form background, and if I change page to page, they will even "overlap". Though other controls (like drop-downs, spinner, non-containerized objects) vanish and appear as the page grows and shrinks. Is there something magic about the container objects on a page like this, and if so, how can I get them to follow the "collapse" behavior?

Best Regards,
Scott
MIET, MASHRAE, CDCP, CDCS, CDCE, CTDC, CTIA, ATS

"Everything should be made as simple as possible, and no simpler."hammer

RE: PageFrame Trickery

First of all, when you adjust the page frame height, any inner objects of pages don't react to this at all, they are staying in position and keeping their size, the pages/page frame will clip them. Why should they shrink? They only would shrink, if you'd anchor them. There is no automatic anchoring, though, so by default the controls don't resize.

There was a bug with I think comboboxes or listboxes on pages showing through in VFP7, but that should be fixed since at least in VFP9.

Bye, Olaf

RE: PageFrame Trickery

(OP)
Olaf,
If you open say Word, version after 2007, it has the ribbon bar. The behavior I'm trying to mimic is that of having the ribbon shrink and grow from the topline menu down to full size (when you click on the "expand/contract" button on the right" and then "pin" it to the form if you want it to stay open. So I thought the easy way to do this would just be to reduce the pageframe height until it reached 1, which would just leave the border visible at 1 pixel. I had expected the behavior to hide everything with it, but clearly that's not the case. I don't want to have to reduce every single control down to 0 or 1 because it will mean a lot of craziness to make that happen.
Then the behavior would be if you click a tab it would show the ribbon associated with the new tab.
Any idea how I might make this work?

Best Regards,
Scott
MIET, MASHRAE, CDCP, CDCS, CDCE, CTDC, CTIA, ATS

"Everything should be made as simple as possible, and no simpler."hammer

RE: PageFrame Trickery

You said

Quote:

they do not "collapse" with the page frame itself

You put collapse in quote, if you just meant vanish, disappear, hide, become invisible, then why did you choose the term collapsing? Collapsing reminded me of shrinking by anchoring. I don't propose to anchor all controls is a solution. Simply forget about this aspect.

All I said is that this should work, though I know a bug, a real VFP runtime bug, that made combo boxes of the non active page show through. What you see seems connected to that bug. But it should be fixed already. Are you sure your containers are inside pages and not just on the page location?`

Bye, Olaf.

RE: PageFrame Trickery

Scott, can I makee sure I have understood this.

Are you saying that when you shrink the ribbon, you do so by reducing the height of the pageframe in such as way that only the tabs are showing? And, if so, when you do that, you are still seeing controls below the tabs in the space that the ribbon previously occupied?

If that's right, it seems likely that the controls in question weren't on the pages in the first places. They were in the higher level container, that is, the container which contains the pageframe.

Is that possible, do you think?

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads

RE: PageFrame Trickery

(OP)
Hi Olaf, sorry, it was a bad choice of words, I had a lot of distractions around me when I wrote that. But the main aim is, mimic the behavior of the ribbon in an office application.

Hi Mike, thanks for looking in on this. As crazy as it sounds, those objects (which are all containers that "show through") are all indeed on the page, and not in the Form over the top of the pageframe/page. And it's also confirmed by: Page 1 has 4 buttons, Page 2 has 1 button, page 3 has 0 buttons page 4 has 1 button (of the container type, or subclasses of it). As I change pages, those all appear (and will even "stack" on top of each other where there was a button before), because interestingly as I change pages, the page 1 buttons remain, and then the subsequent page buttons appear where they normally would if the page was open.

Now, for clarity, the pageframe has Tabs property set to .F. So the page doesn't collapse to just leave the tabs, it collapses to just leave 1 pixel wide line (because the tabs depend on that line as well for their "defining outline". The tabs are actually the same kind of container buttons as are on the pageframe, but text-only versions of them. So I was very surprised that after collapsing the page frame down to only 1 pixel, those items all still appear. It's a very strange behavior and frustrating because it's a plan that I thought should really work, but doesn't due to some quirk... So now I'm looking for other ideas to make this happen. (Or create the illusion of it happening really).

Best Regards,
Scott
MIET, MASHRAE, CDCP, CDCS, CDCE, CTDC, CTIA, ATS

"Everything should be made as simple as possible, and no simpler."hammer

RE: PageFrame Trickery

(OP)
Hi Olaf, sorry, it was a bad choice of words, I had a lot of distractions around me when I wrote that. But the main aim is, mimic the behavior of the ribbon in an office application.

Hi Mike, thanks for looking in on this. As crazy as it sounds, those objects (which are all containers that "show through") are all indeed on the page, and not in the Form over the top of the pageframe/page. And it's also confirmed by: Page 1 has 4 buttons, Page 2 has 1 button, page 3 has 0 buttons page 4 has 1 button (of the container type, or subclasses of it). As I change pages, those all appear (and will even "stack" on top of each other where there was a button before), because interestingly as I change pages, the page 1 buttons remain, and then the subsequent page buttons appear where they normally would if the page was open.

Now, for clarity, the pageframe has Tabs property set to .F. So the page doesn't collapse to just leave the tabs, it collapses to just leave 1 pixel wide line (because the tabs depend on that line as well for their "defining outline". The tabs are actually the same kind of container buttons as are on the pageframe, but text-only versions of them. So I was very surprised that after collapsing the page frame down to only 1 pixel, those items all still appear. It's a very strange behavior and frustrating because it's a plan that I thought should really work, but doesn't due to some quirk... So now I'm looking for other ideas to make this happen. (Or create the illusion of it happening really).

Best Regards,
Scott
MIET, MASHRAE, CDCP, CDCS, CDCE, CTDC, CTIA, ATS

"Everything should be made as simple as possible, and no simpler."hammer

RE: PageFrame Trickery

Haven't been following all of this, but I can give you my experience: I designed a pageframe toolbar years ago for my framework. The pageframe is put in a toolbar positioned at the top of my toplevel forms. Users can hide the toolbar by calling the toolbar's Hide() method.

RE: PageFrame Trickery

(OP)
Hi Olaf,
It's VFP 9, SP2, the build is 7423, as far as I'm aware that was the last version...
UIEnable, interesting, I recently used that method for the first time, but i don't remember what for or where. I'll have a look and see if it could be an influence.

Best Regards,
Scott
MIET, MASHRAE, CDCP, CDCS, CDCE, CTDC, CTIA, ATS

"Everything should be made as simple as possible, and no simpler."hammer

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close