lgxjames
lgxjames

Reputation: 73

How do I use my own custom buttons and design with wxpython

I've been looking for some inspiration with wxpython as far as the GUI goes. Everything in the demo looks boring and uninspiring so I want to go in my own direction but I can't figure out how to use my own buttons I made in photoshop or my own background images.

I'm kind of new to GUI programming so I ask if you could please be clear in what steps I should take. Once I intialize the frame...how to I load my custom buttons, or set the panel background?

Upvotes: 2

Views: 780

Answers (2)

Mike Driscoll
Mike Driscoll

Reputation: 33111

As acattle pointed out, I already wrote on how to change a panel's background. You should note that wxPython isn't a themable GUI toolkit. It uses the native widgets of the OS wherever possible and most of the time, those just aren't very themable. If you need that, then you should look at Tkinter's (especially ttk) or pyside/pyQt.

If you need bitmap buttons, there are several options:

  • BitmapButton
  • GradientButton
  • AquaButton
  • PlateButton

Upvotes: 2

acattle
acattle

Reputation: 3113

I did some googling and I found this tutorial for setting the background of panels.

A bit more googling and I found this post talking about wxPython's Bitmap Button Class and showing some code examples.

I would suggest being very very careful designing your GUI if you're going to use custom images. You need to pay special attention to your spacing and your text sizes or your GUI might come out looking like crap.

Upvotes: 0

Related Questions