Print Page | Close Window

Yet Another Pane Width Problem

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=3711
Printed Date: 21 May 2024 at 7:40am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Yet Another Pane Width Problem
Posted By: jcollier
Subject: Yet Another Pane Width Problem
Date Posted: 28 February 2006 at 10:59am
After reviewing previous posts about pane width, none of them seem to work with simply setting the width of a pane and having it show at that width.  It seems that many problems would be answered ahead of time if there were a pane.width and pane.height property that we could just set to what we want and have the pane resize to that property value.

That said, what I am trying to do is show a form on a pane.  That works fine.  However, when the user checks a checkbox, I want the form and the pane to widen out to show more options.  When they uncheck it, I want it to go back to it's original width.  However, the following code isn't quite working:

Set a = frmParent.DockingPaneManager.FindPane(3)
a.MinTrackSize.SetSize 690, 620
frmParent.DockingPaneManager.RedrawPanes

It does change the mintracksize but if I want the pane to show at that width, I have to manually resize it with the mouse.

Any suggestions?

Thanks!



Replies:
Posted By: SuperMario
Date Posted: 28 February 2006 at 11:09am
check this post out...first set the min and max to the same value to resize the pane, then change it to allow resize:

https://forum.codejock.com/forum_posts.asp?TID=3602&KW=n ormalize


Posted By: jcollier
Date Posted: 28 February 2006 at 12:06pm
Yeah, I saw that post.  That's where I originally saw the .RedrawPanes line.  However, I guess I should have mentioned that this is a floating pane and is never docked.

I tried the following:

Set a = frmParent.DockingPaneManager.FindPane(3)
a.MinTrackSize.SetSize 690, 620
a.MinTrackSize.SetSize 690, 620
frmParent.DockingPaneManager.RedrawPanes

but the form still does not resize on it's own.  It does act a little differently now in that if I click on the edge of the form when I have the resize cursor it jumps to the specified size.  Still doesn't do it without the mouse though.


Posted By: Oleg
Date Posted: 28 February 2006 at 12:34pm
You can set this Track Sizes in Form_Load and after make it floating.

-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: jcollier
Date Posted: 28 February 2006 at 12:39pm
I'm not sure how that helps.  When the user clicks the check box I want the form/pane to expand.  If they uncheck the check box it needs to go back to the smaller size.  I'm confused at how anything in Form_Load would affect the pane getting resized after it's not docked.


Posted By: SuperMario
Date Posted: 28 February 2006 at 1:52pm
if floating then:

    Set A = DockingPaneManager.FindPane(3)
    DockingPaneManager.FloatPane A, 0, 0, 692, 620


Posted By: jcollier
Date Posted: 28 February 2006 at 2:02pm
Beautiful!

That works.  Thanks!



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