Python
  Home arrow Python arrow Page 3 - A Look at wxPython
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PYTHON

A Look at wxPython
By: Peyton McCullough
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 23
    2005-06-22


    Table of Contents:
  • A Look at wxPython
  • The Basics
  • Creating Windows and Status Bars
  • Creating Menus
  • Events
  • Some Widgets

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    A Look at wxPython - Creating Windows and Status Bars
    ( Page 3 of 6 )

    All right. Dialogs are fine to mess with for a while, but let's move on. (By the way, note that wxPython includes many more dialogs). Let's create a window:

    from wxPython.wx import *

    application = wxPySimpleApp()

    dialog = wxFrame ( None, wxID_ANY, 'Title Here.' )

    dialog.Show ( True )

    application.MainLoop()

    When creating a wxFrame, three arguments are passed, as you can see. The first argument is the parent, which you have already seen. Our window does not have a parent. The second argument is the ID of the object. We don't need to worry about it in this tutorial –- passing wxID_ANY will work fine. The third argument is, obviously, the title of the window.

    Many applications have status bars at the bottom with certain text. We can add a simple one to our application:

    from wxPython.wx import *

    application = wxPySimpleApp()

    window = wxFrame ( None, wxID_ANY, 'Title Here.' )

    window.CreateStatusBar()

    window.Show ( True )

    application.MainLoop()



     
     
    >>> More Python Articles          >>> More By Peyton McCullough
     

       

    PYTHON ARTICLES

    - Tuples and Other Python Object Types
    - The Dictionary Python Object Type
    - String and List Python Object Types
    - Introducing Python Object Types
    - Mobile Programming using PyS60: Advanced UI ...
    - Nested Functions in Python
    - Python Parameters, Functions and Arguments
    - Python Statements and Functions
    - Statements and Iterators in Python
    - Sequences and Sets in Python
    - Python Expressions and Operators
    - Dictionaries, Variables and Statements in Py...
    - Data Types in Python
    - The Python Language
    - SSH with Twisted





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
    Stay green...Green IT