I recently came across a question on StackOverflow where the user wanted to know how to drag images onto their image control in wxPython and have the dragged image resize into a thumbnail. This piqued my interest and I decided to figure out how to do it. I knew that you could create a thumbnail […]
September 28, 2017 by
Mike The wxPython toolkit supports using keyboard shortcuts via the concept of Accelerators and Accelerator Tables. You can also bind directly to key presses, but in a lot of cases, you will want to go with Accelerators. The accelerator gives to the ability to add a keyboard shortcut to your application, such as the ubiquitous "CTRL+S" […]
Every now and then, I see someone asking how to get the text for each item in a row of a ListCtrl in report mode. The ListCtrl does not make it very obvious how you would get the text in row one, column three for example. In this article we will look at how we […]
I recently decided to start putting together some fun example desktop applications using Python. I've been using wxPython to create the cross platform applications. My first one is called Boomslang XML and is a basic XML editor. The name, Boomslang, comes from a large venomous snake. It's name basically means "tree snake", which I thought […]
Most applications come with the Status Bar. The status bar is the widget along the bottom of most applications that you use every day. They give you information about what line you're editing in a text editor or when you last saved. In wxPython, you can add a status bar to your frame by using […]
The wxPython GUI toolkit comes with many widgets. A common control is a tree widget. wxPython has several different tree widgets, including the regular wx.TreeCtrl, the newer DVC_TreeCtrl and the pure Python variants, CustomTreeCtrl and HyperTreeList. In this article, we will focus on the regular wx.TreeCtrl and learn the basics of how to create and […]