Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Limit size of docking panes
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Limit size of docking panes

 Post Reply Post Reply
Author
Message
fredwobus View Drop Down
Newbie
Newbie
Avatar

Joined: 02 September 2004
Location: Austria
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote fredwobus Quote  Post ReplyReply Direct Link To This Post Topic: Limit size of docking panes
    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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 16 September 2004 at 12:45am

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
Back to Top
fredwobus View Drop Down
Newbie
Newbie
Avatar

Joined: 02 September 2004
Location: Austria
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote fredwobus Quote  Post ReplyReply Direct Link To This Post Posted: 16 September 2004 at 2:00am

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

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 16 September 2004 at 9:45am

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
Back to Top
dennisV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 October 2004
Location: Australia
Status: Offline
Points: 242
Post Options Post Options   Thanks (0) Thanks(0)   Quote dennisV Quote  Post ReplyReply Direct Link To This Post Posted: 07 October 2004 at 8:37pm
Quote 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)).

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)
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 11 October 2004 at 12:18am
yes. See updated Pane Sample.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
Wolfgang View Drop Down
Newbie
Newbie


Joined: 01 December 2003
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote Wolfgang Quote  Post ReplyReply Direct Link To This Post Posted: 14 October 2004 at 7:18am

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

Back to Top
dennisV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 October 2004
Location: Australia
Status: Offline
Points: 242
Post Options Post Options   Thanks (0) Thanks(0)   Quote dennisV Quote  Post ReplyReply Direct Link To This Post Posted: 14 October 2004 at 7:30am
Originally posted by Wolfgang Wolfgang wrote:

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

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)
Back to Top
Wolfgang View Drop Down
Newbie
Newbie


Joined: 01 December 2003
Status: Offline
Points: 36
Post Options Post Options   Thanks (0) Thanks(0)   Quote Wolfgang Quote  Post ReplyReply Direct Link To This Post Posted: 14 October 2004 at 7:43am

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

Back to Top
dennisV View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 October 2004
Location: Australia
Status: Offline
Points: 242
Post Options Post Options   Thanks (0) Thanks(0)   Quote dennisV Quote  Post ReplyReply Direct Link To This Post Posted: 14 October 2004 at 7:48am
Originally posted by Wolfgang Wolfgang wrote:

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

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)
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.