Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Docking Pane
  New Posts New Posts RSS Feed - How do I retrieve Pane Size?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

How do I retrieve Pane Size?

 Post Reply Post Reply
Author
Message
gallman View Drop Down
Newbie
Newbie


Joined: 06 September 2004
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote gallman Quote  Post ReplyReply Direct Link To This Post Topic: How do I retrieve Pane Size?
    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!



Edited by gallman
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
gallman View Drop Down
Newbie
Newbie


Joined: 06 September 2004
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote gallman Quote  Post ReplyReply Direct Link To This Post Posted: 06 November 2004 at 8:15pm
Thanks. Please add these properties to the next build. They would be convenient.
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
gallman View Drop Down
Newbie
Newbie


Joined: 06 September 2004
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote gallman Quote  Post ReplyReply Direct Link To This Post 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?

Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
gallman View Drop Down
Newbie
Newbie


Joined: 06 September 2004
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote gallman Quote  Post ReplyReply Direct Link To This Post 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!

 



Edited by gallman
Back to Top
Ashm01 View Drop Down
Newbie
Newbie
Avatar

Joined: 21 December 2004
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote Ashm01 Quote  Post ReplyReply Direct Link To This Post Posted: 24 December 2004 at 3:52am
Yes, How do I Set the Pane Size????
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.