Moving Panes by code |
Post Reply |
Author | |
Maui
Groupie Joined: 10 June 2004 Status: Offline Points: 95 |
Post Options
Thanks(0)
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 |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
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. |
|
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 |