![]()  | 
 
Changed behaviour of "xtpTabLayoutSizeToFit" | 
 
    Post Reply  
   | 
  
| Author | |
   
   akur  
   
   Senior Member  
   Joined: 16 May 2006 Status: Offline Points: 139  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     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!  | 
 |
![]()  | 
 |
   
   Oleg  
   
   Senior Member  
   Joined: 21 May 2003 Location: United States Status: Offline Points: 11234  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     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  | 
 |
![]()  | 
 |
   
   akur  
   
   Senior Member  
   Joined: 16 May 2006 Status: Offline Points: 139  | 
  
   
      Post Options
    
        Thanks(0)
      Quote   Reply
   
     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. | 
 |
![]()  | 
 |
    Post Reply  
   | 
  |
|       
  
  Tweet   	
    | 
 
| Forum Jump | Forum Permissions  ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum  |