windows explore --- menubar

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
gorge.alan.sw
Experienced Solver
Experienced Solver
Posts: 82
Joined: Tue Sep 25, 2012 6:51 pm

windows explore --- menubar

Post by gorge.alan.sw » Sun Dec 09, 2012 1:16 pm

Hi,

How can i make GUI like windows. Please suggest is this approach right which i have listed.
http://www.homeandlearn.co.uk/bc/images3/wExplorer2.gif

Please correct me :--
a> first make one frame -- wxframe
b> then add menubar to it
c> then add menuitem to it.
d> then add statusbar
e> then make one panel
divide panel vertically into three parts.
3 of picture ---->> create bitmap buttons
4 of picture ---->> wxlist & some button
5+6 of picture ---->> wxsplitted window & two scrolled windows
5 is created by making panel into left scrolled window ---->> then creating wxtree inside it ?

Please correct me. Any reply will be appreciable.

Regards,
//Allan
Attachments
untitled.PNG
untitled.PNG (24.93 KiB) Viewed 807 times

Radek
Super wx Problem Solver
Super wx Problem Solver
Posts: 286
Joined: Sun Sep 11, 2011 7:17 am

Re: windows explore --- menubar

Post by Radek » Sun Dec 09, 2012 4:43 pm

In general, correct. You will need to add some sizers: wxWidgets positions child windows (controls) using sizers instead of specifying position and size of the child windows. If you have some experience with Visual C++ or Qt, it is the same technique.

"3" is a toolbar. There is an object for it along with an object for tool items. You can have more toolbars in a single window.
"4" is also a toolbar. The first "tool" is a wxTextCtrl, buttons (or standard "tools" like in "3") can follow.
"5" is a wxTreeCtrl. A control which can organize items in a tree structure. There is also a specialized tree control which displays a directory tree - wxGenericDirCtrl.

So far, no splitter window. All of this is only sizers and standard controls. You will need the splitter window when you need a "sash" which divides the window area between two sub windows and when you need to be able to change the position of the sash (thus redistributing the area between the windows). For example, if you want a tree and a list like in "6" and if you want to be able to shrink the tree and boost the list then you will need a splitter window.

Post Reply