Home arrow Python arrow Alternative Frames in wxPython

Alternative Frames in wxPython

I'm sure you know all about wxPython's primary frame, wxFrame. It is the basis for most of your windows and will most likely continue to be. Of course, though, wxPython offers other things to put controls on. I'm sure you're getting bored of attaching your controls to slight variations of the same exact thing. In this article, we'll explore other frames offered by wxPython, examining what they are for, how they are used and how to change their appearance.

  1. Alternative Frames in wxPython
  2. wxDialog
  3. wxWizard
  4. Multiple Document Interface
By: Peyton McCullough
Rating: starstarstarstarstar / 9
August 29, 2005

print this article



Let's get started.


Our first stop is wxMiniFrame. It is basically a frame with a short title bar at the top, rather than the large one that wxFrame displays. While entire applications will definitely look strange in a wxMiniFrame, small windows that must stay out of the user's way can be made with wxMiniFrame. Let's take a look:

from wxPython.wx import *

class Window ( wxMiniFrame ):

   def __init__ ( self ):

      # No suprises here

      # We only use a different class

      wxMiniFrame.__init__ ( self, None, -1, 'A Small Frame' )

      # Create a panel

      self.panel = wxPanel ( self, -1 )

      # Create a wxCheckBox

      self.check = wxCheckBox ( self.panel, -1, 'This is a wxMiniFrame', pos = ( 10, 10 ) )

      # No suprises here, either

      self.Show ( True )

application = wxPySimpleApp()



The wxMiniFrame class features nothing else worth mentioning. It's nothing more than a small frame. Let's move on to something else.

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

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort


- Python Big Data Company Gets DARPA Funding
- Python 32 Now Available
- Final Alpha for Python 3.2 is Released
- Python 3.1: String Formatting
- Python 3.1: Strings and Quotes
- Python 3.1: Programming Basics and Strings
- 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

Developer Shed Affiliates


Dev Shed Tutorial Topics: