AGW Logo

agw_title Advanced Generic Widgets

This is the Advanced Generic Widgets package (AGW). It provides many custom-drawn wxPython controls: some of them can be used as a replacement of the platform native controls, others are simply an addition to the already rich wxPython widgets set.

AGW screenshots

AGW sample screenshots

Starting from version, AGW has been officially integrated in the wxPython framework, under the wx.lib.agw package.

In order to use one of the AGW widgets, you can simply write:

import wx.lib.agw.customtreectrl as CT

# CustomTreeCtrl subclass

class CustomTreeCtrl(CT.CustomTreeCtrl):

    def __init__(self, parent, id=wx.ID_ANY, pos=wx.DefaultPosition,

        CT.CustomTreeCtrl.__init__(self, parent, id, pos, size, style, agwStyle)

        # Do something else in the initialization...

Some of the widgets contained in AGW are simply a translation/improvements of existing wxWidgets C++ controls (i.e., aui or ultimatelistctrl are a couple of examples).

Date:12 March 2012


There currently is a first draft of the documentation, created with HTML Help Workshop, in a downloadable format. You can get the CHM file here (10.3 MB).


As per AGW version 0.8.0, most widgets constructors have a modified signature, taking into account the introduction of the agwStyle keyword.

description Description

AGW contains many different modules, listed below. Items labelled with an asterisk were already present in wx.lib before:

  • advancedsplash: reproduces the behaviour of wx.SplashScreen, with more advanced features like custom shapes and text animations;
  • aquabutton: this is another custom-drawn button class which approximatively mimics the behaviour of Aqua buttons on the Mac;
  • aui: a pure-Python implementation of wx.aui, with many bug fixes and new features like HUD docking and AuiNotebook tab arts;
  • balloontip: allows you to display tooltips in a balloon style window (actually a frame), similarly to the Windows XP balloon help;
  • buttonpanel (*): a panel with gradient background shading with the possibility to add buttons and controls still respecting the gradient background;
  • cubecolourdialog: an alternative implementation of wx.ColourDialog, it offers different functionalities like colour wheel and RGB cube;
  • customtreectrl (*): mimics the behaviour of wx.TreeCtrl, with almost the same base functionalities plus a bunch of enhancements and goodies;
  • flatmenu: as the name implies, it is a generic menu implementation, offering the same wx.MenuBar/wx.Menu/wx.ToolBar capabilities and much more;
  • flatnotebook (*): a full implementation of the wx.Notebook, and designed to be a drop-in replacement for wx.Notebook with enhanced capabilities;
  • floatspin: this class implements a floating point spinctrl, cabable (in theory) of handling infinite-precision floating point numbers;
  • foldpanelbar (*): a control that contains multiple panels that can be expanded or collapsed a la Windows Explorer/Outlook command bars;
  • fourwaysplitter: this is a layout manager which manages four children like four panes in a window, similar to many CAD software interfaces;
  • genericmessagedialog: it is a possible replacement for the standard wx.MessageDialog, with a fancier look and extended functionalities;
  • gradientbutton: another custom-drawn button class which mimics Windows CE mobile gradient buttons, using a tri-vertex blended gradient background;
  • hyperlink (*): this widget acts line an hyper link in a typical browser;
  • hypertreelist: a class that mimics the behaviour of wx.gizmos.TreeListCtrl, with almost the same base functionalities plus some more enhancements;
  • infobar: a transient window shown at top or bottom of its parent window to display non-critical information to the user;
  • knobctrl: a widget which lets the user select a numerical value by rotating it, like a slider with a wheel shape;
  • labelbook and FlatImageBook: these are a quasi-full implementations of wx.ListBook, with additional features;
  • multidirdialog: it represents a possible replacement for wx.DirDialog, with the additional ability of selecting multiple folders at once and a fancier look;
  • peakmeter: this widget mimics the behaviour of LED equalizers that are usually found in stereos and MP3 players;
  • persist: widgets which automatically save their state when they are destroyed and restore it when they are recreated, even during another program invocation;
  • piectrl and ProgressPie: these are simple classes that reproduce the behavior of a pie chart, in a static or progress-gauge-like way;
  • pybusyinfo: constructs a busy info window and displays a message in it: it is similar to wx.BusyInfo;
  • pycollapsiblepane: a pure Python implementation of the original wxWidgets C++ code of wx.CollapsiblePane, with customizable buttons;
  • pygauge: a generic wx.Gauge implementation, it supports the determinate mode functions as wx.Gauge;
  • pyprogress: it is similar to wx.ProgressDialog in indeterminated mode, but with a different gauge appearance and a different spinning behavior;
  • ribbon: the RibbonBar is a set of classes for writing a ribbon user interface, similar to the user interface present in recent versions of Microsoft Office;
  • rulerctrl: it implements a ruler window that can be placed on top, bottom, left or right to any wxPython widget. It is somewhat similar to the rulers you can find in text editors software;
  • shapedbutton: this class tries to fill the lack of “custom shaped” controls in wxPython. It can be used to build round buttons or elliptic buttons;
  • shortcuteditor: a widget that allows the user to customize and change keyboard shortcuts via a dialog;
  • speedmeter: this widget tries to reproduce the behavior of some car controls (but not only), by creating an “angular” control;
  • supertooltip: a class that mimics the behaviour of wx.TipWindow and generic tooltips, with many features and highly customizable;
  • thumbnailctrl: a widget that can be used to display a series of images in a “thumbnail” format; it mimics, for example, the Windows Explorer behavior when you select the “view thumbnails” option;
  • toasterbox: a cross-platform widget to make the creation of MSN-style “toaster” popups easier;
  • ultimatelistctrl: mimics the behaviour of wx.ListCtrl, with almost the same base functionalities plus some more enhancements;
  • xlsgrid: a class based on wx.grid.Grid that can be used to faithfully reproduce the appearance of a Microsoft Excel spreadsheets;
  • zoombar: a class that appoximatively mimics the behaviour of the Mac Dock, inside a wx.Panel.

stats Code Statistics

Code statistics for AGW:

Code statistics for AGW (12-March-2012)
Stat Name Value Relative Percentage
Total Lines Of Code (Including Demos) 164363
Total Lines Of Code (Excluding Demos) 132722
Docstring Lines 18777 14.24%
Python Code Lines 113945 85.76%

other_info Other Information

Bugs and Limitations: many, patches and fixes welcome :-D

See the demos for an example of what AGW can do, and on how to use it.

Copyright: Andrea Gavana

License: Same as the version of wxPython you are using it with.

SVN for latest code:

Mailing List:

My personal web page:

Please let me know if you are using AGW!

You can contact me at:

AGW version: 0.9.4

Last updated: 12 March 2012, 22.00 GMT

Table Of Contents

Next topic

AGW Master Index


Current version: 0.9.4

Get the latest AGW from the wxPython SVN repository, or view the latest modifications using Viewvc.

Questions? Suggestions?

Send your questions to the wxPython mailing list:

You can also open an issue at the tracker.