Change Pane Size Dynamically |
Post Reply |
Author | |
thodgson
Groupie Joined: 11 August 2003 Status: Offline Points: 78 |
Post Options
Thanks(0)
Posted: 06 December 2003 at 1:18pm |
Sorry if this is obvious, but I'm having trouble finding it: How can I dynamically resize a pane once it is created and attached? In my OnCreate method, I have: m_pwndOutbar = m_paneManager.CreatePane(IDR_PANE_OUTBAR, CRect(0, 0, 130, 0), dockLeftOf, m_pwndTreeView ); In the above, the size is initially set. I'd hate to have to destroy the pane and re-create it. Tim |
|
dkf8117
Newbie Joined: 06 February 2004 Location: United States Status: Offline Points: 4 |
Post Options
Thanks(0)
|
Ever find a solution to this?
|
|
thodgson
Groupie Joined: 11 August 2003 Status: Offline Points: 78 |
Post Options
Thanks(0)
|
I didn't find exactly what I was looking for, but I was able to create a workaround, which works well for us. My approach was to create a layout, then save it to the registry if it doesn't already exist. I was informed that layouts must be created in whole, then activated. You cannot move panes around one at a time any way you like - which is what I really wanted.
Anyway, in the following code sample, I have a window pane layout named "Visual Studio". If it was already created and saved to the registry, it is loaded and the layout is "set" (available). If it doesn't already exist, I create the layout, and save it to the registry. // Create or load the Visual Studio Layout m_pLayoutVisualStudio = m_paneManager.CreateLayout(); if (m_pLayoutVisualStudio->Load(_T("VisualStudio"))) { m_paneManager.SetLayout(m_pLayoutVisualStudio); } else { m_paneManager.DockPane(m_pwndTreeView, dockLeftOf); m_paneManager.DockPane(m_pwndOutbar, dockLeftOf, m_pwndTreeView); m_paneManager.DockPane(m_pwndPaneChartRealtime, dockBottomOf); m_paneManager.DockPane(m_pwndPaneOutput, dockBottomOf); m_paneManager.DockPane(m_pwndPaneLog, dockBottomOf); m_paneManager.DockPane(m_pwndPaneChartResponseTime, dockBottomOf); m_paneManager.AttachPane(m_pwndOutbar, m_pwndTreeView); m_paneManager.AttachPane(m_pwndPaneOutput, m_pwndPaneChartRealtime); m_paneManager.AttachPane(m_pwndPaneLog, m_pwndPaneChartRealtime); m_paneManager.AttachPane(m_pwndPaneChartResponseTime, m_pwndPaneChartRealtime); m_pwndTreeView->Select(); m_pwndPaneChartRealtime->Select(); m_paneManager.GetLayout(m_pLayoutVisualStudio); m_pLayoutVisualStudio->Save(_T("VisualStudio")); } Whenever I want to show the Visual Studio layout, I just set the pane manager layout: m_paneManager.SetLayout(m_pLayoutVisualStudio); Conceivably, you could do this on the fly... Tim Hodgson Edited by thodgson |
|
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 |