Splitter window help Topic is solved

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
mohan
Experienced Solver
Experienced Solver
Posts: 61
Joined: Wed May 07, 2008 9:55 am

Splitter window help

Post by mohan » Wed Jul 30, 2008 4:10 am

Hi All,
I want to split a window horizontally into three parts.I am able to split the window into two parts but I can't split into three.What should I do to acheive it??

Thanks,
Mohan.

priyank_bolia
wxWorld Domination!
wxWorld Domination!
Posts: 1339
Joined: Wed Aug 03, 2005 8:10 am
Location: BANGALORE, INDIA
Contact:

Post by priyank_bolia » Wed Jul 30, 2008 4:18 am

recursive splitting.
Add another window to that splitted part and split it into two.

mohan
Experienced Solver
Experienced Solver
Posts: 61
Joined: Wed May 07, 2008 9:55 am

Post by mohan » Wed Jul 30, 2008 4:29 am

Here is my code.VariableGrid is a scrolled window derived class.Now I want to add a panel to the SplitterWindow.

splitter = new SplitterWindow(this);

splitter->SetSashGravity(0.5);

split_top=new VariableGrid(splitter);
split_top->SetBackgroundColour(*wxWHITE);

split_middle=new VariableGrid(splitter);
split_middle->SetBackgroundColour(*wxWHITE);
split_middle->SetScrollbars(20,0,50,50);

split_bottom=new Panel(splitter);

splitter->SplitHorizontally(split_top,split_middle,100);

Should I do like this,

splitter1=new SplitterWindow(this);
splitter1->SplitHorizontally(splitter,split_bottom,100);

I tried this one but it is showing some error related to GetParent().

Thanks,
Mohan.

priyank_bolia
wxWorld Domination!
wxWorld Domination!
Posts: 1339
Joined: Wed Aug 03, 2005 8:10 am
Location: BANGALORE, INDIA
Contact:

Post by priyank_bolia » Wed Jul 30, 2008 5:16 am

Modified the splitter sample to create three split windows, have a look at it.
Attachments
splitter.cpp
Modified splitter sample
(13.47 KiB) Downloaded 78 times

mohan
Experienced Solver
Experienced Solver
Posts: 61
Joined: Wed May 07, 2008 9:55 am

Post by mohan » Wed Jul 30, 2008 6:01 am

Thanks for your immediate reply and helping me out to solve it.

Thanks once again,
Mohan

Post Reply