Fixing Size of CXTPDockingPane |
Post Reply |
Author | |
asparagusx
Groupie Joined: 06 February 2007 Status: Offline Points: 53 |
Post Options
Thanks(0)
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 |
|
asparagusx
Groupie Joined: 06 February 2007 Status: Offline Points: 53 |
Post Options
Thanks(0)
|
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
|
|
asparagusx
Groupie Joined: 06 February 2007 Status: Offline Points: 53 |
Post Options
Thanks(0)
|
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 |
|
akur
Senior Member Joined: 16 May 2006 Status: Offline Points: 139 |
Post Options
Thanks(0)
|
Hi,
after calling pPane->SetMinTrackSize(); call pXtpDockingPanemanager->RecalcFramesLayout(). This will resize your pane immediately. |
|
asparagusx
Groupie Joined: 06 February 2007 Status: Offline Points: 53 |
Post Options
Thanks(0)
|
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
|
|
asparagusx
Groupie Joined: 06 February 2007 Status: Offline Points: 53 |
Post Options
Thanks(0)
|
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 parameterss = 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 sizepPane->DialogSize = s; // user various combinations of RecalcFramesLayout, RedrawPane etc. here - no effect!} |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hello,
Show code where you create all panes and set its max size.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
asparagusx
Groupie Joined: 06 February 2007 Status: Offline Points: 53 |
Post Options
Thanks(0)
|
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!
|
|
shineryu
Groupie Joined: 02 April 2006 Location: China Status: Offline Points: 33 |
Post Options
Thanks(0)
|
I have the same problem!
|
|
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 |