Print Page | Close Window

Prevent DockingPane from sizing

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=781
Printed Date: 10 June 2024 at 11:15am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Prevent DockingPane from sizing
Posted By: Irisz
Subject: Prevent DockingPane from sizing
Date Posted: 25 May 2004 at 12:19am

Hi,

How do I prevent my DockingPane from sizing ? (I mean sizing by the user)

thanks,Iris.




Replies:
Posted By: SuperMario
Date Posted: 20 October 2004 at 12:58pm
This feature has now been added (9.51), take a look at the PaneSample.  Run the application and select Docking Pane-> Min Max Sample from the menubar.  If you would not like the pane to be sized, you can set both the min and max values to be the same and they won't be able to resize it.


Posted By: stephen_hyc
Date Posted: 02 February 2005 at 7:37pm

But after you hide and then make it show , you will find you can resize it again.How to deal with it



Posted By: mjm_d
Date Posted: 20 September 2005 at 4:52am

But after you floate, you will find you can resize it again.How to deal with it



Posted By: Agent 007
Date Posted: 28 September 2005 at 2:30pm

See the Min/Max layout in the Pane sample.  For Pane 2 in the OnCreate function comment out the line of code that prevents the Pane from closing.

// Get a pointer to IDR_PANE2 and set the title.
pPane = GetDockingPaneManager()->FindPane(IDR_PANE2);
ASSERT(pPane);
if (pPane)
{
    pPane->SetTitle(_T("Pane 2 - No Closeable\nPane 2"));
    // pPane->SetOptions(xtpPaneNoCloseable); // Comment out this line.
}

You will also have to remove the entry in the System Registry for the Pane sample.  Otherwise Pane 2 will still not be closeable.  This registry entry is  HK_CURRENT_USER->Software->Codejock Sample Applications->Codejock Docking Pane Sample. Run the application again and float pane 2.  Now close the pane.  Now Select the Menu item Docking Panes-Panes->Pane 2 to show Pane 2.  The pane is still not resizable. 



Posted By: Agent 007
Date Posted: 28 September 2005 at 2:47pm
An alternative method to get the sample to work is to comment out the LoadLayout coad to prevent the application from loading the info fro the system registry.  This code is in the OnCreate function in the CMainFrame Class.

// If "RunLayout" layout does not exist, save the current configuration
// as "RunLayout", otherwise load previous state.

m_pRunLayout = GetDockingPaneManager()->CreateLayout();
//if (!m_pRunLayout->Load(_T("RunLayout")))
//{
//     GetDockingPaneManager()->GetLayout(m_pRunLayout);
//}

Comment out the code shown above and then run the program and follow the steps posted above.




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