Print Page | Close Window

Set pane size

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=4497
Printed Date: 10 November 2025 at 5:35pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Set pane size
Posted By: yoavo
Subject: Set pane size
Date Posted: 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.



Replies:
Posted By: SuperMario
Date 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));


Posted By: yoavo
Date 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) ?


Posted By: SuperMario
Date 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();
}


Posted By: yoavo
Date Posted: 28 June 2006 at 10:31am
but when you do it this way, the splitter between the panes does not working anymore...



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