Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - How to resize a docking pane from code
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How to resize a docking pane from code

 Post Reply Post Reply
Author
Message
davidecapod View Drop Down
Newbie
Newbie


Joined: 30 January 2013
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote davidecapod Quote  Post ReplyReply Direct Link To This Post Topic: How to resize a docking pane from code
    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

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

Joined: 14 July 2003
Status: Offline
Points: 1048
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post Posted: 01 September 2016 at 9:08am
Hi;

I need this too!
Any ideas yet?

M.
Martin

Product: Xtreme Toolkit v 15.3.1, new Projects v 18.3.0
Platform: Windows 8.1 (64bit)
Language: VC++ 20
Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1048
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post 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 15.3.1, new Projects v 18.3.0
Platform: Windows 8.1 (64bit)
Language: VC++ 20
Back to Top
davidecapod View Drop Down
Newbie
Newbie


Joined: 30 January 2013
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote davidecapod Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.094 seconds.