Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - Changed behaviour of "xtpTabLayoutSizeToFit"
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Changed behaviour of "xtpTabLayoutSizeToFit"

 Post Reply Post Reply
Author
Message
akur View Drop Down
Senior Member
Senior Member


Joined: 16 May 2006
Status: Offline
Points: 139
Post Options Post Options   Thanks (0) Thanks(0)   Quote akur Quote  Post ReplyReply Direct Link To This Post Topic: Changed behaviour of "xtpTabLayoutSizeToFit"
    Posted: 25 January 2007 at 3:35am
Hello,

my clients required to make the autohidden tabs as long as possible, that is, to use the whole available space. So I've set the layout to "xtpTabLayoutSizeToFit", then declared CXTPTabPaintManager::SizeToFit() as virtual and overrode it. In my override, I allow not just to shrink tabs if it's needed, but I also make them longer whenever possible. It works fine, so instead of the default behaviour, I get this special behaviour of mine - which is the desired state:


           (tabs are resized to take the whole space available)


(I've defined also a maximal tab length that must not be exceeded)


This would be fine; the only problem is that when autohiding another group of panes, the first group doesn't get resized to leave some space for the second group. That means, the second group will get only the rest of the space -- the space which has not been used up by group 1:



Now, if I keep reducing the width of the main window, the width of the 1st group remains unchanged, so only the 2nd group keeps shrinking until it disappears completely. Group 1 will start shrinking only when group 2 is completely invisible (has a zero-pixel width). Basically, the problem is that group 1 is "greedy"!

What do you think, how can the autosizing be changed to resize all tab groups, so that they can share the available space fairly?

Thank you, in advance!





Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 25 January 2007 at 5:03am
Hi, you can modify sources in CXTPDockingPaneAutoHidePanel::RefreshManagersArray. And modify rcClient before call pManager->GetPaintManager()->RepositionTabControl(pManager, pDC, rcClient);
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
akur View Drop Down
Senior Member
Senior Member


Joined: 16 May 2006
Status: Offline
Points: 139
Post Options Post Options   Thanks (0) Thanks(0)   Quote akur Quote  Post ReplyReply Direct Link To This Post Posted: 26 January 2007 at 5:41am
Thank you, oleg, I think this will help me.

Anyway, I'm glad that my long explanation above could be understood without any difficulties.  I was not sure whether it's clear enough.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.203 seconds.