How to resize a docking pane from code |
Post Reply |
Author | |
davidecapod
Newbie Joined: 30 January 2013 Status: Offline Points: 5 |
Post Options
Thanks(0)
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 |
|
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1201 |
Post Options
Thanks(0)
|
Hi;
I need this too! Any ideas yet? M. |
|
Martin Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0 Platform: Windows 10 v 22H2 (64bit) Language: VC++ 2022 |
|
mgampi
Senior Member Joined: 14 July 2003 Status: Offline Points: 1201 |
Post Options
Thanks(0)
|
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 22.1.0, new Projects v 24.0.0 Platform: Windows 10 v 22H2 (64bit) Language: VC++ 2022 |
|
davidecapod
Newbie Joined: 30 January 2013 Status: Offline Points: 5 |
Post Options
Thanks(0)
|
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. |
|
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 |