Limit size of docking panes |
Post Reply |
Author | |
fredwobus
Newbie Joined: 02 September 2004 Location: Austria Status: Offline Points: 22 |
Post Options
Thanks(0)
Posted: 15 September 2004 at 7:02am |
Hi
I am using the docking panes for an SDI application. I want to limit the way by which the user can change the layout of the panes. Simply using LockSplitters and xtpPaneNoFloatable is no good, because the user should be able to moves certain splitters, but not others. I started off with the AppWizard, that gives me the "Options" and "Properties" pane to play with. For reference - I named my project "TestProject". The pane manager is running in the MainFrame, the remaining space is taken up by CTestProjectView as defined by this code in TestProject.cpp : pDocTemplate = new CSingleDocTemplate( IDR_MAINFRAME, RUNTIME_CLASS(CProject2Doc), RUNTIME_CLASS(CMainFrame), &a mp;n bsp; &nbs p; // main SDI frame window RUNTIME_CLASS(CTestProjectView)); I managed to hook my own FormView dialog into the "remaining space" TestProjectView. This dialog is showing some logo that is always visible when the application runs. I now want to achieve several things: 1. The TestProjectView with the logo (like a banner) should always have a fixed height (obviously only if there is a pane below it to take the remaining window height). 2. The splitter seperating the logo view and the view contaiing my tab manager should be locked, so the user cannot change that fixed height. 3. The panes ("Options" and "Properties") should have certain minimum widths and heights. i.e. if the options and properties are placed side-by-side I should by able to drag the splitter too far to the left to make the Options pane smaller than 100 pixel in width. Here's sketch: +----------------------+ | logo view | | | +----------------------+ <- locked splitter | |   ; | | options | properties| | |   ; | +----------+-----------+ ^ | splitter is movable, but widths of options and properties windows cannot be smaller than X pixels. Thanks to all CodeJockeys for your help!!! Fred Wobus Edited by fredwobus |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
You don't need floating, you don't need autohide, you don't need docking. So why do you use DockingPanes? I suggestion you to use simple CSplitterWnd (CXTSplitterWnd) it can perform all your needs. |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
fredwobus
Newbie Joined: 02 September 2004 Location: Austria Status: Offline Points: 22 |
Post Options
Thanks(0)
|
Thanks Oleg, I have thought of that. We will need the ability to allow the user to change the layout in various ways. Moving the splitters is certainly one thing we need. Using the splitterwnd would give us a rigid application layout, that can only change by expanding and collapsing certain windows depending on what the user is doing. It would probably work for our first version, but would not be able to progress from there. We might need the functionality to be able to pick up a window by its title bar and drop it to a different place in the layout. The docking panes can do that, but they don't seem to allow me to restrict that behaviour in any way. Can you think of a way to implement such restrictions ? The docking panes allow the user to tear the application apart - our users are typical beginners, they would not be able to use the aqpplication after one or two misplaced drag&drops. Even I curse my VisualStudio every so often when it doesn't allow me to freeze a certain layout that I like and a window disappera and move around almost at will. So I would like to take the docking panes by the reins and control what it's doing. Thanks for your help, Fred |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Sorry, but with current version of DockingPanes it's not possible. We plan to add such restrictions in one of next versions. You only can lock all splitters (LockSplitters(TRUE)). |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
dennisV
Senior Member Joined: 07 October 2004 Location: Australia Status: Offline Points: 242 |
Post Options
Thanks(0)
|
Is it possible with v9.50? I have a need for similar functionality. Thanks |
|
// W7 64 Ultimate SP1
// VS 2008 // CodeJock 16.2.3 (MFC) |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
yes. See updated Pane Sample.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
Wolfgang
Newbie Joined: 01 December 2003 Status: Offline Points: 36 |
Post Options
Thanks(0)
|
But as I see from the example it is notpossible to resize the coresponding panes anymore, but there is still an Mousecurser change on the borders, is this a bug? Thanks in advance Wolfgang |
|
dennisV
Senior Member Joined: 07 October 2004 Location: Australia Status: Offline Points: 242 |
Post Options
Thanks(0)
|
I, for example, don't see such a cursor - I have a docking pane (fixed size) from which I removed the close button, but it auto-hides and can be pinned, and there's no cursor on the splitter line. Or are you talking about something else? |
|
// W7 64 Ultimate SP1
// VS 2008 // CodeJock 16.2.3 (MFC) |
|
Wolfgang
Newbie Joined: 01 December 2003 Status: Offline Points: 36 |
Post Options
Thanks(0)
|
Interesting! Currently i have only the 9.51 example and there i see and have a Resize Cursor. Especially if set to autohide, i can resize Pane 2 to quite invalid sizes! Regards Wolfgang |
|
dennisV
Senior Member Joined: 07 October 2004 Location: Australia Status: Offline Points: 242 |
Post Options
Thanks(0)
|
I'm not sure about their examples, I'm actually speaking of my program, which I recompiled with 9.51 and I don't have this cursor. I have only one pane though, so it might be different. Just checked their example, and yes, there's a cursor there. Perhaps it's because they don't have SetMin/Maxxxx() function call (too lazy to check code, sorry!). |
|
// W7 64 Ultimate SP1
// VS 2008 // CodeJock 16.2.3 (MFC) |
|
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 |