473,480 Members | 1,857 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Getting a painted background in wxPython...

7 New Member
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
5 2405
bartonc
6,596 Recognized Expert Expert
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
Che M
7 New Member
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
6,596 Recognized Expert Expert
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
6,596 Recognized Expert Expert
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
Che M
7 New Member
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

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

Similar topics

2
1640
by: bugbear | last post by:
A piece of text was disappearing on one of my pages. Careful editing down shows that any content following a floated-then-cleared element flips things, so that the background of the outer element...
8
11309
by: Susan Bricker | last post by:
Hi. I am opening a form (frmUserSettings) just before (or so I thought) the Main Menu form (frmMainMenu) is opening but it's not getting the focus. It gets "painted" and then the Main Menu gets...
3
1343
by: Blair Bonnett | last post by:
Hi all, Run into a problem I can't find a solution for. I'm writing a C# app which has a custom background for the form (a gradient). I've successfully overridden the forms...
9
1513
by: David Sulc | last post by:
Hi ! I've looked all over (internet, books, etc.) and I haven't found a very good ressource to get started with wxPython (yes, I've been through their tutorial). What I would basically like...
4
2092
by: hzgt9b | last post by:
Using VB .NET 2003, I have a windows application that performs a series of file actions (copy, move, delete) but the actions are completing before the window is painted on the screen... how can I...
3
2536
by: citronelu | last post by:
Hi, I'm new to wxpython, and the following code is my first serious attempt: #~ start code import wx class MyPanel(wx.Panel):
7
2380
by: raylaur | last post by:
I'm using a javascript "slide" function to move a <div> layer in 10 pixel increments from one location on a page to another. The layer contains a GIF image. It's basically a side panel that flies out...
25
2296
by: Eric | last post by:
Hello, after reading some of the book Programming Python it seems that python is something I would like to delve deeper into. The only thing is, I have no idea what I should try and write. So I was...
12
2757
by: icarus | last post by:
platform: windows xp professional, python 2.5, wxpython When I double-check on my program file test.py (for simplicity I'll be using this code below), I see the window just fine. But the ms-dos...
0
6920
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7059
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7103
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5362
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4799
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4499
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3011
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
572
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
203
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.