![]() |
Insuring one pane remains in pane container. |
Post Reply ![]() |
Author | |
mitcheljh ![]() Groupie ![]() Joined: 20 July 2008 Location: United States Status: Offline Points: 35 |
![]() ![]() ![]() ![]() ![]() Posted: 30 August 2008 at 8:35am |
Hi, I'm using a pane manager in my main childview, to house 2 main panes What I'd like to do now, is to insure one of the two main panes is always present in the main pane container, but it could be either one I'm guessing there's at least one way to do this in the XTP_DOCKINGPANE_ACTION event. I may need to perform a few restrictions to achieve this goal...
1) Preventing floating of the pane container. 2) only allowing detaching of the panes. 3) not allowing detaching of a pane if the other pane is already floated. I think I have a handle on #3 above, but am having problems with 1 and 2. Thanks!
After a bit more work I was able to find a solution to my desired behavior. I thought I'd share my solution in case others needed the same kind of behavior. The solution includes creating a boolean class member to flag when one of the panes is just starting to be dragged. I'm guessing there's other solutions to achieving this behavior, so this is just one that works for me.
LRESULT CChildView::OnDockingPaneNotify(WPARAM wParam, LPARAM lParam) return 0;
return false; |
|
![]() |
|
kent_t ![]() Groupie ![]() Joined: 15 July 2008 Status: Offline Points: 13 |
![]() ![]() ![]() ![]() ![]() |
I for one, would like to Thank You very much.
![]() That code just saved me several hours of painful trial and error code searching and testing. I made the decision to buy CodeJock without realizing there is not any meaningful documentation, (that I can find at least). So now I have to live with it. I feel like I'm using open source software that is supported by the community instead of a company. Thanks again, I really appreciate it. |
|
![]() |
|
mitcheljh ![]() Groupie ![]() Joined: 20 July 2008 Location: United States Status: Offline Points: 35 |
![]() ![]() ![]() ![]() ![]() |
No problem Kent. Glad to hear someone besides myself needs the same kind of behavior. I've actually updated the code above to account for a couple of other things that should be considered, and to also remove the 'pin' when only one pane remains. (Last remaining pane shouldn't be able to be unpinned or closed). The code is below. In the code, you'll notice I use two different panes, a tree pane and a calendar pane. Slight modifications will be needed for more than 2 panes.
|
|
![]() |
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 |