Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Docking Pane
  New Posts New Posts RSS Feed - Moving Panes by code
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Moving Panes by code

 Post Reply Post Reply
Author
Message
Maui View Drop Down
Groupie
Groupie


Joined: 10 June 2004
Status: Offline
Points: 95
Post Options Post Options   Thanks (0) Thanks(0)   Quote Maui Quote  Post ReplyReply Direct Link To This Post Topic: Moving Panes by code
    Posted: 15 June 2004 at 5:56am

I have a few panes in my app and moving them all around can sometimes create some undesired results. I would like to create a default layout (or two) so that the user can click a menu item and restore some sort of default order/positioning.

Is there anyway to move panes to where you want them to be using code?

If i could somehow move them to where I want and then Savestate I could then reload them at any time using LoadState but I dont know how to move them predictably.

The only method I can see that places panes in a position is CreatePane. Do I need to keep destroying my panes and then recreating them just to move them about?

Any help appreciated.

Thanks

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: 17 June 2004 at 2:42pm
Yes, you could use the SaveStateToString method to save you layout to a file, you can create multiple predefined layouts this way.  Then you use the LoadStateFromString method to load the layouts.

What you need to do is run your application using only the SaveStateToString method and create your layout my draging the panes to the desired positions.  Once you have the layouts saved to a file, you simply call the LoadStateFromString method with the desired layout file.  

This method would move the panes in a predictable manner because you are moving them to the exact position had then in when you save the layout.
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.109 seconds.