Re: [Dev-C++] wxWidgets, wxDevC++, Question
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Malcolm N. <m.n...@wa...> - 2004-11-24 12:44:27
|
> Aloha from Honolulu, > I'm using wxDevC++ which has Dev-C++ 4.9.9.0 and wxWidgets beta 6.3 > combined. When I first start there appears a window down the right side > of the wxDevC++ main screen. This has the word "All" in a white box > with a grayed out arrow (it looks like a selection box). Then below are > various Icons and Lables: An Arrow Icon with "Selector", a Box Icon > (white square with arrow heads pointing out on each of the 4 sides) with > "BoxSizer", The same Box Icon with "StaticBoxSizer",... A capital A Icon > with "StaticText",etc. These look like various widgets that can be > inserted into a program. But as soon as I open anything; a new file or > project, an existing file or project, anything that opens in the main > window, this "Widgets Window" disappears and there seems no way to get > it back. I've displayed every toolbar and menu I can find in every tool > option listed, but nothing relates to it. I can't find it mentioned in > the help files for DevC++ or wxWidgets. Does anybody know what it is? > How do I get it back once I start writing code? It has interesting > things I want to experiment with, but it only exists on the initial > screen. I have to exit and restart the program to get it back and as > soon as I open anything it's gone. A very frustrating Arrrgh! Anyone > out there have a clue? > Mahalo (Thank You), > Roger Furer Sorry if this seems too simple for you, but there may be others on the list who require this level of explanation. The best way to work with wxDevC++ (as far as I am concerned) is to start a new project. File - New - Project... Then (assuming you are using Beta 6.4 (the current release) wxWidgets Frame, or wxWidgets Dialog. Create a directory for the project, and save into that directory. Now just hit F9 (by hit I of course mean gently press, we don't want you to break your keyboard). The simple frame project should compile correctly, and you should be presented with a basic frame based window. Close this. Now, on the properties bar on the left of the screen, press the Project tab, then expand the project presented. Within this file list is one named "newProgramFrame.wxform". Double click on this file (or select the newProgramFrame.wxform tab and you will see the basic form for the project. What do you want to do now? To add a menu - In the drop down list (the one with All in it), select Menu. Click on MenuBar, then click on the form. An icon appears on the form. This icon represents the menu, unfortunately at the moment there is no real wysiwyg in wxDevC++. Now to create a menu, on the properties bar click on "EditMenuItems", then on the "..." button which appears. This should produce the dialog where you can create your menu. To Create a toolbar - In the drop down list select Toolbar. Click once on ToolBar, once on the form. Voila a toolbar. Now click on ToolButton, and then on the newly created ToolBar on the form. You have to repeat this for all the buttons or other controls you want on the ToolBar. If you want to add a Sizer (wxWidgets uses Sizers to arrange the space around controls (see http://neume.sourceforge.net/sizerdemo/ for a simple explanation) and their use is the same as for the previous controls. Single click on the control name and then a single click on the form (be aware though thatwxDevC++ dowsn't allow you to drop a sizer on a form which already has other Standard Components (such as the previously mentioned Menu and ToolBar). Basically the Form is where you design the look of the program. You can insert a new wxFrame or wxDialog and there should be a new filename.form file created where you design the new dialog. I hope that this sufficiently answers your question. Best Mal |