Print Page | Close Window

How to resize a docking pane from code

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=21572
Printed Date: 26 April 2024 at 3:31am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How to resize a docking pane from code
Posted By: davidecapod
Subject: How to resize a docking pane from code
Date Posted: 02 April 2013 at 8:20am
Hi all,
I need to programmatically resize a docking pane from code.
My purpouse is to implement a "dynamic" pane that opens and closes with different sizes depending of a context; to do this I call CXTPDockingPaneManager::ShowPane and CXTPDockingPaneManager::ClosePane from code, but I need to set an initial height of the pane when I show it.

I tried to fix the height using SetMinTrackSize and SetMaxTrackSize with the height value I want in the OnDockingPaneNotify handler, and then restoring min/max track size (after some milliseconds with a timer) to allow further resizing from the user.

This seems to work, but sometimes when I manually change the layout of the docking panes (for example, show or hide another pane) my pane gets resized to a wrong size, losing the height I had set with SetMinTrackSize and SetMaxTrackSize.
It seems to me that the SetMinTrackSize/SetMaxTrackSize way does not "fully resize" internally the pane (maybe m_rcWindow and/or m_szDocking?).

How can I do a proper and reliable resizing by code?
Thanks
Davide




Replies:
Posted By: mgampi
Date Posted: 01 September 2016 at 9:08am
Hi;

I need this too!
Any ideas yet?

M.


-------------
Martin

Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017


Posted By: mgampi
Date Posted: 01 September 2016 at 11:30am
To be more specific:

I have two docking panes that are shown in a mutual way at the same docked position.
When pane 1 is shown and resized by the user via splitter the hidden pane 2 should get the size of pane 1 as soon as it becomes visible.
I have no idea where to start from...

Thanks in advance

Martin


-------------
Martin

Product: Xtreme Toolkit v 19.0.0, new Projects v 19.1.0
Platform: Windows 10 v 1909 (64bit)
Language: VC++ 2017


Posted By: davidecapod
Date Posted: 22 September 2016 at 6:22am
Hi, we just upgraded to the latest version of XTP (17.2.0.), and we will see if with this version things are better...
See my old first message about our current implementation using SetMinTrackSize/SetMaxTrackSize.



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