1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Chapter2.Exploring wxGlade</title><meta name="generator" content="DocBook XSL Stylesheets V1.61.2"/><link rel="home" href="index.html" title="wxGlade user manual"/><link rel="up" href="index.html" title="wxGlade user manual"/><link rel="previous" href="ch01s06.html" title="Contacts"/><link rel="next" href="ch02s02.html" title="Basics of wxGlade"/></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter2.Exploring wxGlade</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch01s06.html">Prev</a></td><th width="60%" align="center"></th><td width="20%" align="right"><a accesskey="n" href="ch02s02.html">Next</a></td></tr></table><hr/></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a id="id2857201"/>Chapter2.Exploring wxGlade</h2></div></div><div/></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="ch02.html#id2857209">Quick start</a></dt><dt><a href="ch02s02.html">Basics of wxGlade</a></dt><dt><a href="ch02s03.html">Command line invocation</a></dt><dt><a href="ch02s04.html">Using the source code</a></dt><dt><a href="ch02s05.html">Specifying the path of bitmaps</a></dt></dl></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="id2857209"/>Quick start</h2></div></div><div/></div><p> We will design a simple form.
</p><p> Start wxGlade by running the <b class="command">wxglade.py</b> program.
</p><p> You will see a Main Palette with several buttons, and a Tree
Window with an icon marked “<span class="quote">Application</span>”. A Properties Window shows the properties
of the Application.
</p><p> If you move the mouse over a button in the main window, a tooltip will display its function.
</p><p> To add a frame in the design window, from the Main Palette choose
the first button: “<span class="quote">Add a frame</span>”.
</p><p> Then choose wxFrame as the base class.
</p><p> Look at the tree window and see that two icons are generated
under the application icon, a frame icon and a sizer icon.
</p><p> If you double click with the mouse on the frame icon, the designer
window appears.
Notice that the sizer is displayed as a set of gray boxes: they are
the “<span class="quote">slots</span>” of the grid sizer where you will place the widgets.
</p><p> You put a widget on a sizer by selecting it on the Main Window,
then click on an empty slot on the frame on the designer window.
Try adding a static text, a text control and a button.
</p><p> If you want to add something else, add empty slots on the sizer by
right-clicking on the sizer on the tree window and selecting
“<span class="quote">Add slot</span>”.
</p><p> Play around, adding four or five widgets on the frame.
</p><p> Now look at the properties form; there are three tabs. In the
“<span class="quote">Common</span>”
tab you can specify the name, size and color of the widget.
</p><p> In the “<span class="quote">Layout</span>” tab you can adjust borders and alignments.
</p><p> In the “<span class="quote">Widget</span>” tab you find the properties depending on the
widget.
</p><p> You can select the properties of a widget by clicking on the designer window
or the corresponding icon on the tree window.
</p><p> Try adjusting widgets with the properties form until you know you have
played enough.
</p><p> Now let's generate the code.
</p><p> Select the Application icon on the tree window and
go to the properties window.
</p><p> Check Name and Class, choose a Top window, check Single file and
choose the language
and set the Output path by pushing the button for selecting a path and a filename.
</p><p> Finally press the Generate code button, and the code is generated.
</p><p> Compile and enjoy.
</p></div></div><div class="navfooter"><hr/><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch01s06.html">Prev</a></td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right"><a accesskey="n" href="ch02s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Contacts</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">Basics of wxGlade</td></tr></table></div></body></html>
|