Print Page | Close Window

Setting a Pane size

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Docking Pane
Forum Description: Topics Related to Codejock Docking Pane
URL: http://forum.codejock.com/forum_posts.asp?TID=3602
Printed Date: 02 July 2024 at 9:16am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Setting a Pane size
Posted By: Shawshank
Subject: Setting a Pane size
Date Posted: 05 February 2006 at 3:42pm
I have a Pane docked along the left side. When the mouse moves over the button along the left the Pane pops out. Is there a way to set the Pane to a specifc size? Much how the Pane will "recall" the size after adusting the width. Is it possible to set the Pane to a specific size? I see that you can set a min/max size but I don't see a specific size. Is that possible?



Replies:
Posted By: SuperMario
Date Posted: 06 February 2006 at 7:50am
Setting the min and max to the same size will lock the pane to a specific size.

    Pane.MinTrackSize.SetSize 100, 100
    Pane.MaxTrackSize.SetSize 100, 100

If the pane is docked to the Left\Right, then the "Width" will be used, if Top\Bottom, then the "Height" specified will be used.  The only time both width and height are used is when the pane is floating.

If you do not want the pane "locked", then use the code above to resize the pane to the desired size, then use this code to set the mix\max the pane can be sized to:

    'Remembers previous size settings
    DockingPaneManager.NormalizeSplitter s

    'Sets the minimum and maximum sizes the splitter can move
    'Note, this will not resize the pane, it is specifying how
    'large the user can move the splitters
    'Maximum\Minimum size will be 0x0 and 200x200
    Pane.MinTrackSize.SetSize 0, 0
    Pane.MaxTrackSize.SetSize 200, 200


    DockingPaneManager.RedrawPanes


Posted By: Shawshank
Date Posted: 06 February 2006 at 11:39pm
Thanks, that did the trick perfectly.



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