![]() |
Set pane size |
Post Reply
|
| Author | |
yoavo
Senior Member
Joined: 29 February 2004 Location: Israel Status: Offline Points: 140 |
Post Options
Thanks(0)
Quote Reply
Topic: Set pane sizePosted: 27 June 2006 at 8:55am |
|
I have 2 panes docked to the left, one on top of the other (they have the same height).
How can I change programaticaly their height ?
Yoav.
|
|
![]() |
|
SuperMario
Senior Member
Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
Quote Reply
Posted: 27 June 2006 at 10:12am |
|
Maybe something like this, you set the min and max height to the same size, then save the splitter positions, then chnage the min\max height\width back to what you want the user to be able to resize:
pPane->SetMinTrackSize(CSize(150, 150)); pPane->SetMaxTrackSize(CSize(150, 150)); GetDockingPaneManager()->NormalizeSplitters(); pPane->SetMinTrackSize(CSize(50,50)); pPane->SetMaxTrackSize(CSize(32000,20)); |
|
![]() |
|
yoavo
Senior Member
Joined: 29 February 2004 Location: Israel Status: Offline Points: 140 |
Post Options
Thanks(0)
Quote Reply
Posted: 28 June 2006 at 12:36am |
|
it didnt solve the problem.
Isn't there a method which allows me to change the size of a docked pane (as in FloatPane) ?
|
|
![]() |
|
SuperMario
Senior Member
Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
Quote Reply
Posted: 28 June 2006 at 9:42am |
|
You can see the PaneSample for more on how to do this.
Look at this function: void CMainFrame::OnMinMaxSamlpe() { m_bMinMaxSample = !m_bMinMaxSample; if (m_bMinMaxSample) { CXTPDockingPane* pPane = m_paneManager.FindPane(IDR_PANE1); ASSERT(pPane); pPane->SetMinTrackSize(CSize(100, 100)); pPane->SetMaxTrackSize(CSize(150, 150)); pPane = m_paneManager.FindPane(IDR_PANE2); ASSERT(pPane); pPane->SetMinTrackSize(CSize(130, 130)); pPane->SetMaxTrackSize(CSize(130, 130)); } else { CXTPDockingPane* pPane = m_paneManager.FindPane(IDR_PANE1); ASSERT(pPane); pPane->SetMinTrackSize(CSize(0, 0)); pPane->SetMaxTrackSize(CSize(32000, 32000)); pPane = m_paneManager.FindPane(IDR_PANE2); ASSERT(pPane); pPane->SetMinTrackSize(CSize(0, 0)); pPane->SetMaxTrackSize(CSize(32000, 32000)); } for (int i = 0; i < sizeof(m_wndPanes) / sizeof(m_wndPanes[0]); i++) { if (m_wndPanes.m_hWnd) { m_wndPanes.OnSize(0, 0, 0); m_wndPanes.RedrawWindow(); } } GetDockingPaneManager()->RedrawPanes(); } |
|
![]() |
|
yoavo
Senior Member
Joined: 29 February 2004 Location: Israel Status: Offline Points: 140 |
Post Options
Thanks(0)
Quote Reply
Posted: 28 June 2006 at 10:31am |
|
but when you do it this way, the splitter between the panes does not working anymore...
|
|
![]() |
|
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 |