Print Page | Close Window

Changed behaviour of "xtpTabLayoutSizeToFit"

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Docking Pane
Forum Description: Topics Related to Codejock Docking Pane
URL: http://forum.codejock.com/forum_posts.asp?TID=6219
Printed Date: 16 June 2024 at 6:49pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Changed behaviour of "xtpTabLayoutSizeToFit"
Posted By: akur
Subject: Changed behaviour of "xtpTabLayoutSizeToFit"
Date 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!








Replies:
Posted By: Oleg
Date 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


Posted By: akur
Date 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.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net