Yet Another Pane Width Problem |
Post Reply |
Author | |
jcollier
Senior Member Joined: 15 February 2006 Status: Offline Points: 250 |
Post Options
Thanks(0)
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! |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
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 |
|
jcollier
Senior Member Joined: 15 February 2006 Status: Offline Points: 250 |
Post Options
Thanks(0)
|
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. |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
You can set this Track Sizes in Form_Load and after make it floating.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
jcollier
Senior Member Joined: 15 February 2006 Status: Offline Points: 250 |
Post Options
Thanks(0)
|
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.
|
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
if floating then:
Set A = DockingPaneManager.FindPane(3) DockingPaneManager.FloatPane A, 0, 0, 692, 620 |
|
jcollier
Senior Member Joined: 15 February 2006 Status: Offline Points: 250 |
Post Options
Thanks(0)
|
Beautiful!
That works. Thanks! |
|
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 |