Print Page | Close Window

Fixing Size of CXTPDockingPane

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=6465
Printed Date: 26 November 2024 at 11:56pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Fixing Size of CXTPDockingPane
Posted By: asparagusx
Subject: Fixing Size of CXTPDockingPane
Date Posted: 20 February 2007 at 6:38am
Hallo
 
I know there are various topics about sizing CXTPDockingPanes, but I cannot resolve an issue I have. I have a CXTPDockingPane derived class (CDockingPane) and I want to force the size of the pane to be fixed, when docked. When the pane is docked to the bottom of my application, it 'grows' to fit the avaiable space, even though I have called

pPane->SetMinTrackSize(s);

pPane->SetMaxTrackSize(s);
 
to 'fix' the size of the pane. The height of the docked pane is many times higher than the maximum height set using SetMaxTrackSize which uses up valuable space in my client area. How can a force the docked size to be a specific value.
 
Thanks
 
Anton



Replies:
Posted By: asparagusx
Date Posted: 21 February 2007 at 7:04am
Further to this problem (everything here seems related), but I am unable to resize a CXTPDockingPane derived class correctly. I need to resize a floating pane IMMEDIATLY e.g. set it's new size. I have tried may combinations of SetMinTrackSize, SetMaxTrackSize, RedrawPane, RedrawFramesLayout etc. but cannot seem to be to force the size of a floating pane.
 
PLEASE HELP!
 
Anton


Posted By: asparagusx
Date Posted: 22 February 2007 at 12:05am

Any progress on this?. I have implemented a number of exciting new features in our software, based on Xtreme Toolkit, but there still seem to be what appears to be some basic issues that is stalling development.

 

Thanks

Anton



Posted By: akur
Date Posted: 23 February 2007 at 11:50am
Hi,

after calling pPane->SetMinTrackSize();
call pXtpDockingPanemanager->RecalcFramesLayout(). This will resize your pane immediately.


Posted By: asparagusx
Date Posted: 23 February 2007 at 12:01pm
Akur
 
Sorry - tried this and many other combinations and it does not work! I have a function called InitSize which can set either the Min, Max (or both) tracking sizes. It does not resize immediatly (which is what I want), but will resize when the users clicks on the edges of the pane and it will then 'snap' to the correct size. I have called RedrawPane, RecalcFrameLayout, RecalcFramesLayout - but no luck. I can attach the function if you want.
 
Anton


Posted By: asparagusx
Date Posted: 23 February 2007 at 12:16pm

void CMainFrame::InitSize(CDockingPane *pPane,CWnd *pWnd,bool SetInitSize,UINT Flag,CSize NewSize)

{

CRect c;

CSize s;

if (IsWin(pWnd)) // set size to a given window

{

pWnd->GetClientRect(&c);

s.cx = c.Width();

s.cy = c.Height();

}

else if (NewSize != CSize(-1,-1)) // set size to passed parameters

s = NewSize;

if (Flag == SET_PANE_MIN_TRACK) // set minimum size

{

pPane->SetMinTrackSize(s);

pPane->SetMaxTrackSize(CSize(32000,32000));

}

else if (Flag == SET_PANE_MAX_TRACK) // set maximin size

{

pPane->SetMinTrackSize(CSize(0,0));

pPane->SetMaxTrackSize(s);

}

else if (Flag == SET_PANE_MINMAX_TRACK) // set min and max

{

pPane->SetMinTrackSize(s);

pPane->SetMaxTrackSize(s);

}

if (SetInitSize) // save the original size

pPane->DialogSize = s;

// user various combinations of RecalcFramesLayout, RedrawPane etc. here - no effect!

}



Posted By: Oleg
Date Posted: 26 February 2007 at 4:13am
Hello,
 
Show code where you create all panes and set its max size.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: asparagusx
Date Posted: 27 February 2007 at 12:00am
Oleg
 
I have tried that. The problem is quite complex depending on the requirements of the particular pane (and the contents) of it. If I set the maxsize, then it does fix the size issue when a pane is floated, BUT then when I dock it again, depending on which side of the client area it is being docked, it 'shrinks' to the max size, which makes (for instance) the bottom pane area HUGE, which only then shows a small client area. My application, being a CAD system, requires the client area to be as large as possible at all times, to allow the user a proper view of a drawing. As I said, I can fix it in one way, but then it breaks something else. I only have the issue with some of my docking panes, containing typically a dialog resource (which might only be a few controls in size - e.g. small).
 
So, basically I need to set max size when it floats, but then need to reset maxsize to a large value, BEFORE it docks (e.g. via an action). I have tried this, but it still does not work - any further suggstions?
 
Thanks
 
Anton
 
PS - Overall the library is excellent - just these few frustrating things keep cropping up!


Posted By: shineryu
Date Posted: 19 April 2008 at 11:01am
I have the same problem!



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