Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Docking Pane
  New Posts New Posts RSS Feed - How can I change the pane’s size
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How can I change the pane’s size

 Post Reply Post Reply
Author
Message Reverse Sort Order
gshawn View Drop Down
Senior Member
Senior Member


Joined: 04 October 2004
Status: Offline
Points: 227
Post Options Post Options   Thanks (0) Thanks(0)   Quote gshawn Quote  Post ReplyReply Direct Link To This Post Topic: How can I change the pane’s size
    Posted: 08 March 2005 at 2:19am

I don't know anything about C++, but this could be a possible way to do it in the ActiveX version... should translate easily to the C++ version. Basically, save the values of the pane's min/max tracksizes into variables, then set both min and max tracksizes to the size you want to resize the pane to (300x200 pixels here), then restore the min/max tracksize properties. It's an ungly hack, and as far as I know it would only work with undocked panes...

    MinWidth = DockingPaneManager.Panes(i).MinTrackSize.Width
    MinHeight = DockingPaneManager.Panes(i).MinTrackSize.Height
    MaxWidth = DockingPaneManager.Panes(i).MaxTrackSize.Width
    MaxHeight = DockingPaneManager.Panes(i).MaxTrackSize.Height

    DockingPaneManager.Panes(i).MinTrackSize.SetSize 300, 200
    DockingPaneManager.Panes(i).MaxTrackSize.SetSize 300, 200
    DockingPaneManager.RecalcLayout

    DockingPaneManager.Panes(i).MinTrackSize.SetSize MinWidth, MinHeight
    DockingPaneManager.Panes(i).MaxTrackSize.SetSize MaxWidth, MaxHeight
    DockingPaneManager.RecalcLayout

Back to Top
9rap View Drop Down
Newbie
Newbie


Joined: 07 March 2005
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote 9rap Quote  Post ReplyReply Direct Link To This Post Posted: 08 March 2005 at 1:19am

How can I change the pane's size after it has created.

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.