![]() |
CXTPDockingPaneManager Adding Later |
Post Reply
|
| Author | |
danpetitt
Senior Member
Joined: 17 July 2005 Location: United Kingdom Status: Offline Points: 109 |
Post Options
Thanks(0)
Quote Reply
Topic: CXTPDockingPaneManager Adding LaterPosted: 04 January 2007 at 7:18pm |
|
Hi
I have a GUI (DevStudio like) and have docking panes in the application. I am saving the layout of the panes to an XML file.
My product is being used at the moment, but I want to add a new pane, if i do none of my users can view it unless they delete the settings.xml file.
How do I get my new pane to be added and still maintain the layout and settings of the rest of the app?
Basically in MainFrm I:
As you can see, I create my panes and then i load up my layout from an existing settings file ... but the settings file knows nothing about this new pane (ID_PANE_EDITED_FILES) so it doesnt get added.
I can use m_paneManager.ShowPane( ID_PANE_EDITED_FILES ); to show the pane after loading the layout, but i cant use this all the time as it may be purposefully hidden by the user later on and doing this will keep showing it.
I also added a menu command to view the pane but that doesnt appear either.
Help, can you give me a solution, thanks.
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 05 January 2007 at 1:58am |
|
Hi,
Check number of panes after you load layout:
m_paneManager.GetPaneList().GetSize() and if it was "1" call m_paneManager.CreatePane again.
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
danpetitt
Senior Member
Joined: 17 July 2005 Location: United Kingdom Status: Offline Points: 109 |
Post Options
Thanks(0)
Quote Reply
Posted: 05 January 2007 at 2:22am |
|
Thanks Oleg
Its GetCount (for others reading this post, not GetSize).
Thanks a lot for this, I basically added this as per your suggestion and it works great:
Thanks again Oleg, you have saved me yet again :-) |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 05 January 2007 at 2:32am |
|
No. GetPaneList().GetCount() must return number of created panes - no metter they was hidden or closed.
Don't call AttachPane if you create it after you load layout. Neighbour pane can be closed or hiddne.
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 05 January 2007 at 2:34am |
|
.... For future you can add versrion information to px section.
PX_Int(&px, "VersionInfo", m_nVersion, 0);
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
danpetitt
Senior Member
Joined: 17 July 2005 Location: United Kingdom Status: Offline Points: 109 |
Post Options
Thanks(0)
Quote Reply
Posted: 05 January 2007 at 2:38am |
|
Oops, you got in there whilst i was editing/correcting my original post (darn, no nothing makes sense to others) ... sorry. Is this not okay as I want it to appear next to my Project Pane if its there?
|
|
![]() |
|
danpetitt
Senior Member
Joined: 17 July 2005 Location: United Kingdom Status: Offline Points: 109 |
Post Options
Thanks(0)
Quote Reply
Posted: 05 January 2007 at 2:45am |
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 05 January 2007 at 8:51am |
|
Yes, think this code must work ok.
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
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 |