Quantcast
Channel: wxPython - Mouse Vs Python
Browsing all 80 articles
Browse latest View live

wxPython: How to Create a Generic Wizard

The other day on StackOverflow I saw someone who was struggling with the Wizard widget from wxPython. The wizard doesn’t allow much customization when it comes to its buttons, so I decided to see how...

View Article


Image may be NSFW.
Clik here to view.

wxPython: Creating Your Own Cross Platform Process Monitor with psutil

This week, I came across a fun Python project named psutil on Google Code. It says it works on Linux, Windows, OSX and FreeBSD. What it does is grab all the running processes and gives you information...

View Article


wxPython: How to Programmatically Change wx.Notebook Pages

Occasionally I’ll see someone on the wxPython users group ask about how to make the wx.Notebook change pages (or tabs) programmatically. So I decided it was about time I figured it out. Here is some...

View Article

wxPython: How to Fire Multiple Event Handlers

Today on StackOverflow I saw someone wondering how to bind two functions / methods to the same event in wxPython. It’s really quite easy. Here’s one example: import wx...

View Article

wxPython: How to drag and drop a file from your app to the OS

Today on StackOverflow I saw someone who wanted to know how to drag a file from a wx.ListCtrl onto their Desktop or somewhere else in the file system. They were using the file manager skeleton from...

View Article


wxPython: How to make “flashing text”

People keep on asking fun wxPython questions on StackOverflow. Today they wanted to know how to make “flashing text” in wxPython. That’s actually a pretty easy thing to do. Let’s take a look at some...

View Article

wxPython: How to Get Children Widgets from a Sizer

The other day, I stumbled across a question on StackOverflow asking how to get the children widgets of a BoxSizer. In wxPython, you would expect to call the sizer’s GetChildren() method. However, this...

View Article

Image may be NSFW.
Clik here to view.

wxPython: Adding Checkboxes to ObjectListView

This week I spent some time learning how to add check boxes to the ObjectListView widget in wxPython. If you don’t know, ObjectListView is a 3rd party wrapper for the wx.ListCtrl widget that makes...

View Article


wxPython: How to Double-click an Item in an ObjectListView Widget

This week, I needed to figure out how to attach an event handler that would fire when I double-clicked an item (i.e. row) in an ObjectListView widget that was in LC_REPORT mode. For some reason, there...

View Article


Image may be NSFW.
Clik here to view.

wxPython – Having Fun with Silly Ciphers

When I was a kid, I was really into secret codes and ciphers. I thought they were all kinds of fun. My mom thought it would be fun to use some of the ciphers I was so enamored with in treasure hunts...

View Article

Image may be NSFW.
Clik here to view.

wxPython: How to Minimize to System Tray

I see people asking about this topic from time to time in various places on the internet. Making wxPython minimize to the tray is really quite simple, but there is at least one thing you need to watch...

View Article

Image may be NSFW.
Clik here to view.

wxPython: Making your Frame Maximize or Full Screen

This topic comes up from time to time every year. Someone will ask about how to make their application full screen or how to just make it maximize when it first loads. So we’ll spend a little time...

View Article

Image may be NSFW.
Clik here to view.

wxPython: Updating Your Application with Esky

Today we’re going to learn about one of wxPython’s newer features: wx.lib.softwareupdate. It was actually added a couple of years ago. What this allows you to do is add update abilities to your...

View Article


Image may be NSFW.
Clik here to view.

Using Python to Teach About Finding the Digital Root

My wife teaches 3rd grade math and she recently learned about the process of obtaining the digital root of numbers. The digital root is a single digit number found by summing the individual digits. So...

View Article

Image may be NSFW.
Clik here to view.

wxPython: Creating a Grid with XRC

I recently tried to help someone (on the wxPython mailing list) figure out how to use a Grid widget (wx.grid.Grid) via XRC. It should be simple, but if you run the code below, you’ll discover a weird...

View Article


Image may be NSFW.
Clik here to view.

wxPython: Creating a Simple Tic-Tac-Toe Game

I recently became aware of a Tic-Tac-Toe challenge on github where the programmer is supposed to create a Tic-Tac-Toe game that let’s the player win every time. You have to code it in Python, although...

View Article

Image may be NSFW.
Clik here to view.

wxPython: How to Edit Your GUI Interactively Using reload()

Today, I came across an interesting question on StackOverflow where the author was asking how he could write a wxPython program dynamically. In other words, he wanted to be able to edit the code and...

View Article


Image may be NSFW.
Clik here to view.

wxPython: How to Redirect Python’s Logging Module to a TextCtrl

Today I was reading the wxPython Google group / mailing list and there was someone asking about how to make Python’s logging module write its output to file and to a TextCtrl. It turns out that you...

View Article

Image may be NSFW.
Clik here to view.

wxPython: How to Update a Progress Bar from a Thread

Every now and then, I see someone wondering how to create a progress bar and update it. So I decided to whip up and example application that updates a progress bar (technically a wx.Gauge widget) from...

View Article

Image may be NSFW.
Clik here to view.

wxPython 2.9 and the Newer Pubsub API: A Simple Tutorial

Several years ago, I wrote a tutorial about wxPython 2.8 and its built-in pubsub module which you can read here. Back then, a new API for pubsub was added in wxPython 2.8.11.0 that could be enabled by...

View Article
Browsing all 80 articles
Browse latest View live