Print Page | Close Window

How do I retrieve 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=1376
Printed Date: 09 June 2024 at 9:42pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: How do I retrieve Pane Size?
Posted By: gallman
Subject: How do I retrieve Pane Size?
Date Posted: 05 November 2004 at 1:35pm

Hi I am using the v9.51 ActiveX version of the DockingPane under VB6/SP6.

QUESTION: Is there a way to retrieve a pane's current size (e.g. Pane.Height, Pane.Width)?

NOTE: I already reviewed topic "Topic: pane width/resize" but this specific question was not answered.

I didn't see this property available but wanted to ensure I wasn't missing the obvious.

This feature is important because I need to save/restore this information dynamically as the user hides and shows panes. If there is a suggested workaround, I am open to suggestions.

Thanks!




Replies:
Posted By: SuperMario
Date Posted: 05 November 2004 at 2:16pm
Currently you can't.  However you can use the loadstate, loadstatefromstring, savestate, and savestatetostring methods to save\restore the pane layout anytime you want.


Posted By: gallman
Date Posted: 06 November 2004 at 8:15pm
Thanks. Please add these properties to the next build. They would be convenient.


Posted By: SuperMario
Date Posted: 08 November 2004 at 1:44pm
I was told to use the width/height of the form attached to the pane to get the pane width and height.


Posted By: gallman
Date Posted: 08 November 2004 at 2:19pm

Thanks SuperMario,

I will try this. Does this imply that I can force the pane's width/height by seting the form's relative properties?



Posted By: SuperMario
Date Posted: 09 November 2004 at 7:09am
No, when you attach form it will automatically be sized to the size of the pane.  Changing the size of the form manually will only result in making the form within the pane smaller or bigger.  If you must change the width\height use the Min\MaxTrackSize properties.


Posted By: gallman
Date Posted: 10 November 2004 at 5:37pm

First, let me reiterate my strong request to add get/set Pane.Height and Pane.Width to the next build because these workarounds are inconvenient.

QUESTION: How is CX used by CreatePane to accurately set the pane size? The meat behind my question follows.

Regarding the workaround for getting a pane's current height/width, I tried the workaround of getting the form's size and storing that so that I can use those values when loading a pane. However, I can't find the correlation between the coordinates used during CREATEPANE and the form's width.

For example.

(a) I ensured that the DockingPane and the pane's form are both set to the same ScaleMode.
(b) I then tried storing the form's Width and using that as the CX parm of CreatePane but CreatePane doesn't come close to using the saved size that the form used.

I tried the following combinations:
(a) Saving the Form's Width but CreatePane makes the pane super wide.
(b) Changing the Form's scalemode to vbPixel and saving the ScaleWidth. However, this results in a pane roughly double the expected size.

Note, it doesn't seem to matter what my DockingPane.ScaleMode is set to, because CreatePane's CX value doesn't seem to represented in a calculation that I can set/restore accurately relative to the contained form's size.

Thanks!

 



Posted By: Ashm01
Date Posted: 24 December 2004 at 3:52am
Yes, How do I Set the Pane Size????



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