Problem with wxSplitterWindow and wxFrame.

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
Douchekop
Earned a small fee
Earned a small fee
Posts: 11
Joined: Wed Dec 29, 2004 9:51 pm

Problem with wxSplitterWindow and wxFrame.

Post by Douchekop »

Why doesn't work the following code? The problem is that the frame's are not shown. The only thing I see is the BasicFrame with a splitter in the middle between 2 gray rectangles. So the frames are not visible. When I try LeftFrame->Show(TRUE) the form is shown outside its parent frame. It doesn't matter wheter I put that code before or after BasicSplitter->SplitVertically(LeftFrame, RightFrame, 200)

Code: Select all

BasicFrame::BasicFrame(void) : wxFrame( (wxWindow*) NULL, -1, wxString("Meugheuvel's Logic Synthesis Tool"), wxDefaultPosition, wxSize(800,800), wxDEFAULT_FRAME_STYLE){
    /* This is the constructor of the gui.
     * It makes a splitter, rightframe and a
     * leftframe.
     */
    BasicSplitter = new wxSplitterWindow(this, -1, wxPoint(0,0), GetSize(), wxSP_3D | wxSP_LIVE_UPDATE); // Create a new splitter
    LeftFrame = new CmdFrame(BasicSplitter, TREEFRAME_ID);         // Create the left and right frame..
    RightFrame = new MainFrame(BasicSplitter, MAINFRAME_ID);        // with BasicSplitter as parent.
    BasicSplitter->SplitVertically(LeftFrame, RightFrame, 200);      // tell BasicSplitter what to do.
}
Other Windows like wxScrolledWindow are shown good in wxSplitterWindow. Only wxFrame doesn't work. What is the trick to show wxFrame in a splitter?

I use wxWindows 2.4.2 with MingW under Win XP.
Post Reply