Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Inital Docking States Collapse All
Subject Author Date
Daniel Tiedy Nov 13, 2003 - 4:17 PM

I am having two problems with setting up my inital docking states of my resizable controlbars.

Problem #1. See image ftp://ftp.hash.com/pub/misc/currentinitialstate.jpg. To set up the 3 windows that are docked on the left I did the following.

// Dock Property Bar
m_wndNewPropertyBar.SetInitDesiredSizeVertical(CSize(200, 200));
m_wndNewPropertyBar.SetInitDesiredSizeHorizontal(CSize(200,200));
m_wndNewPropertyBar.SetInitDesiredSizeFloating(CSize(200,300));
m_wndNewPropertyBar.DockControlBar(AFX_IDW_DOCKBAR_LEFT, 1, this, false );

// Dock Pose bar in Property Bar
m_wndPoseBar.SetInitDesiredSizeVertical(CSize(200, 200));
m_wndPoseBar.SetInitDesiredSizeHorizontal(CSize(200,200));
m_wndPoseBar.SetInitDesiredSizeFloating(CSize(200,300));
m_wndNewPropertyBar.DockControlBarIntoTabbedContainer( &m_wndPoseBar, -1, this, false);

RecalcLayout();

// Dock Project Bar
m_wndProjectBar.SetInitDesiredSizeVertical(CSize(200,500));
m_wndProjectBar.SetInitDesiredSizeHorizontal(CSize(1000,200));
m_wndProjectBar.SetInitDesiredSizeFloating(CSize(200,500));
m_wndNewPropertyBar.DockControlBar(&m_wndProjectBar, true, true, this, false);

The m_wndProjectBar:SetInitDesiredSizeVertical(200, 500) seems to have no effect on making this panel take up the majority of the left dock site like shown in: ftp://ftp.hash.com/pub/misc/desiredinitialstate.jpg

Problem #2. I have the timeline dockedas followes:
m_wndTimeLineBar.SetInitDesiredSizeVertical(CSize(300,500));
m_wndTimeLineBar.SetInitDesiredSizeHorizontal(CSize(500,200));
m_wndTimeLineBar.SetInitDesiredSizeFloating(CSize(1000,200));
m_wndTimeLineBar.DockControlBar(AFX_IDW_DOCKBAR_BOTTOM, 2, this, false );
m_wndTimeLineBar.AutoHideModeSet( true, false, false, true );

My desired dock state would be at the bottom, but not under the controlbars that are docked at the left (wndNewPropertyBar, wndPoseBar). To obtain this I gave a Circle of 2. When not in AutoHide mode it is exactly correct. But when in AutoHide mode it always takes up the complete bottom docksite. Is it possible to get what I want?

Technical Support Nov 14, 2003 - 4:06 AM

Dear Daniel,

According to the code provided, you are docking m_wndProjectBar to m_wndNewPropertyBar in the same column. But m_wndNewPropertyBar is already part of the tabbed container. That is why you get heights not fitting what you want. Please first dock "Project Workspace", then dock "Properties", and finally dock "Pose.." to the same tab-container.

Now let’s get to the auto-hide tabs. The outer layer (a.k.a. docking circle #0) of a frame window is occupied by fixed-size control bars (toolbars, menu bars, etc.). The second layer may be occupied by auto-hide tabs (the unnumbered circle). Other inner layers (a.k.a. docking circles with numbers greater than or equal to 1) are used by resizable bars. This design is essential and it is important to implement Visual Studio .NET docking mechanism. The auto-hide tabs could not be placed inside resizable bar layers. But you can make some of your bars similar to MS Office XP’s Task Pane window. This is demonstrated in the FixedSizePanels sample. Such bars are still resizable and they are docked in the outer layer (between toolbars, outside autohide tabs) but cannot be auto-hidden.

Daniel Tiedy Nov 14, 2003 - 3:13 PM

I still have problems with the inital desired height on my m_wndProjectBar. I switch to how you recommended, but I can’t dock the m_wndProjectBar first because because I want it on top. If I dock it first then dock "Properties", the "Properties" control bar is on top which isn’t desired.

So here is my new code:
// Dock Property Bar
m_wndNewPropertyBar.SetInitDesiredSizeVertical(CSize(200, 200));
m_wndNewPropertyBar.SetInitDesiredSizeHorizontal(CSize(200,200));
m_wndNewPropertyBar.SetInitDesiredSizeFloating(CSize(200,300));
m_wndNewPropertyBar.DockControlBar(AFX_IDW_DOCKBAR_LEFT, 1, this, true );

// Dock Project Bar
m_wndProjectBar.SetInitDesiredSizeVertical(CSize(200,500));
m_wndProjectBar.SetInitDesiredSizeHorizontal(CSize(300,200));
m_wndProjectBar.SetInitDesiredSizeFloating(CSize(200,500));
m_wndNewPropertyBar.DockControlBar(&m_wndProjectBar, true, false, this, true );

// Dock Pose bar in Property Bar
m_wndPoseBar.SetInitDesiredSizeVertical(CSize(200, 200));
m_wndPoseBar.SetInitDesiredSizeHorizontal(CSize(200,200));
m_wndPoseBar.SetInitDesiredSizeFloating(CSize(200,300));
m_wndNewPropertyBar.DockControlBarIntoTabbedContainer(&m_wndPoseBar, -1, this, false);


But this still has the same problem. My "Project Workspace" bar is smaller than the "Pose/Properties" bar which is not what I specified in the SetInitDesiredSizeVertically calls.

Technical Support Nov 15, 2003 - 12:14 AM

Dear Daniel,

Please make one small improvement in your code snippet: In this line:
m_wndNewPropertyBar.DockControlBar(AFX_IDW_DOCKBAR_LEFT, 1, this, true );
change last parameter to false.

Daniel Tiedy Nov 18, 2003 - 6:41 PM

The false was actually how I had it originally which didn’t work either. If I use a false for the last parameter the when I dock the m_wndPropertBar it will force the m_wndPropertyBar to be docked to the right, rather than above. See ftp://ftp.hash.com/pub/misc/WrongInitialState.jpg.

Daniel Tiedy Nov 18, 2003 - 6:42 PM
Technical Support Nov 19, 2003 - 1:49 AM

Dear Daniel,

We will provide you with a sample application with the same layout of resizable bars via e-mail today.