By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,909 Members | 2,016 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,909 IT Pros & Developers. It's quick & easy.

Getting a painted background in wxPython...

P: 7
Hello,

I'm curious if it is easy to get panels on your wxPython apps to have backgrounds which are given by a jpg or other bitmap. I found http://www.5etdemi.com/blog/archives...d-in-wxpython/ on a blog, which seems to be the way to do it, but I am too new to Python and wxPython to understand how to implement it.

Can anyone help me understand how to go from this to specifying an image to serve as the background to a panel? Of course I'll want the controls to show up over the panel, and not be obscured by the image.

Also, are there wxPython-created example app screenshots out there?

Thanks,
Che
Feb 23 '07 #1
Share this Question
Share on Google+
5 Replies


bartonc
Expert 5K+
P: 6,596
Hello,

I'm curious if it is easy to get panels on your wxPython apps to have backgrounds which are given by a jpg or other bitmap. I found http://www.5etdemi.com/blog/archives...d-in-wxpython/ on a blog, which seems to be the way to do it, but I am too new to Python and wxPython to understand how to implement it.

Can anyone help me understand how to go from this to specifying an image to serve as the background to a panel? Of course I'll want the controls to show up over the panel, and not be obscured by the image.

Also, are there wxPython-created example app screenshots out there?

Thanks,
Che
Hey, Che! Great to have you join us! Sorry about the delay. My connection's been down all day.
I'm going to take a look at the (fairly new wx lib module) ButtonPanel. I know that they do very cool things with the backgrounds. Some people miss the docs and demos download while they're at the site getting the core download. It is a highly recommend addition. Nearly all the things you can dream of doing are shown with very basic, well commented code.
Welcome to TSDN!
Feb 24 '07 #2

P: 7
Thanks, Barton!

I'll look at ButtonPanel too, though I am concerned that it is not quite right for making a large panel with other controls on it. What I was hoping for is to have the general background of the GUI have either a gradient or something like that, and then have all other controls on that colored panel (textboxes, choices, static text, whatever).

Thanks again, glad to be here,
Che
Feb 25 '07 #3

bartonc
Expert 5K+
P: 6,596
Thanks, Barton!

I'll look at ButtonPanel too, though I am concerned that it is not quite right for making a large panel with other controls on it. What I was hoping for is to have the general background of the GUI have either a gradient or something like that, and then have all other controls on that colored panel (textboxes, choices, static text, whatever).

Thanks again, glad to be here,
Che
I haven't gotten to it yet, but I meant I'd take a look at the source code for that class and see what tricks they use to get the gradient background.
Feb 26 '07 #4

bartonc
Expert 5K+
P: 6,596
Thanks, Barton!

I'll look at ButtonPanel too, though I am concerned that it is not quite right for making a large panel with other controls on it. What I was hoping for is to have the general background of the GUI have either a gradient or something like that, and then have all other controls on that colored panel (textboxes, choices, static text, whatever).

Thanks again, glad to be here,
Che
Hi, Che. I've looked at ButtonPanel. It turns out to be a MiniFrame subclass which is a subclass of Frame. So I think that all the gradient work exemplified there will work for you.
Feb 27 '07 #5

P: 7
Hi, Che. I've looked at ButtonPanel. It turns out to be a MiniFrame subclass which is a subclass of Frame. So I think that all the gradient work exemplified there will work for you.
Thanks, Barton, I'll have a look at it. Overall it's been hard for me to settle on a good "look and feel" for the GUI I'm trying to make, and yet I believe the right look and intuitive layout is important. Whether a gradient may add a little visual texture to the look I'm not sure, but I'll try to play around with it.

Thanks again,
Che
Feb 28 '07 #6

Post your reply

Sign in to post your reply or Sign up for a free account.