I hope someone could get some experience with wxDockIt to help me. I tried some things with it, created dockable sub-windows - just testet the whole lib a bit. This is what builds a frame with two dockable sub-windows with a wxLayoutManager that handles the docking:
Code: Select all
m_pText1 = new wxTextCtrl(this, -1, "First Textbox", wxPoint(10.0, 10.0)); m_pText2 = new wxTextCtrl(this, -1, "This is the second text control.", wxPoint(10.0, 30.0)); // Create the Layout Manager of wxDockIt m_pLM = new wxLayoutManager(this); m_pDockWindow01 = new wxDockWindow(this, wxID_ANY, "Dock Window 1", wxPoint(250, 500), wxSize(196, 196), "dock1"); m_pDockWindow02 = new wxDockWindow(this, wxID_ANY, "Dock Window 2", wxPoint(650, 500), wxSize(196, 196), "dock2"); // Set the two text controls as clients for the docking windows m_pDockWindow01->SetClient(m_pText1); m_pDockWindow02->SetClient(m_pText2); // ...and tell the Layout Manager that we have two docking windows m_pLM->AddDefaultHosts(); m_pLM->AddDockWindow(m_pDockWindow01); m_pLM->AddDockWindow(m_pDockWindow02); // finally showing the two small windows (in this state, they are not docked) m_pDockWindow01->Show(); m_pDockWindow02->Show();
Now to the problem(s). It's mainly a very strange behaviour, and I strongly hope that it is my fault (I may have forgot important lines of code or something) and the reason for it is hopefully not the beta status of the wxDockIt lib.
Now, this is when I move the first small docking window to the left border of the main frame:
Well, you can see what happened: the docking window is in the right location, but -> the dark gray background disappeared, and there is a light gray background with a strange small cube in the top-left corner. What is that small cube for and where did it come from??
Ok, I noticed that I can drag and drop the small cube, so I dragged it to the right. And hey, the dark gray background came back:
But hey, what does that mean, there is a dark and a light gray area, and it seems that the light gray area on the right side is like a panel that I can change in size. Curios.
Now I managed to get rid of the the small cube, and in it's place a dragable-line came in. But not with changing the code, I just dragged the second dockable window to the bottom of the main frame. And *surprise* the small cube has gone. Strange.
Ah a last thing: Did I mention, when I drag the a dockable window to the right of the main frame, it does not dock like on the left side, but then it fills out the whole main frame? I wonder why.
So please, if there is anyone who has some experience with wxDockIt or anyone who thinks he got an explanation, please help me. I just don't get it.
Thanks a lot!