PyGTK - Rollover Buttons

G

Gepi Solo

Hi, I'm a python newbie, coming from PHP & Perl. I'm developing client-server
applications with a GUI. I'm trying to realize rollover buttons with images
as background. I mean... I want to create a class which permit to create
buttons with various shapes, (for instance something like this: O====O with
a label and an image in the central part), that change their color/shapes
when they have the focus on.
I split the image of the shape into 3 parts: left, center (which have to
resize with the label in the button) and right.
I thought to Create an EventBox (with the callback function connected to
it).
Inside this EventBox I'd put a HBox with 3 elements: left image, another
EventBox in the center, and the right image.
The EventBox in the center should have the central part of the shape-image
as background and the Label of the button (and evenually an icon).

Am I right?? I don't know if it's the right way... I didn't find anything
on this topic on Google. Anyway if it's the right way... I don't know how:
1. To put the central image as background in the inner EventBox(does the
background image behave like in html tables where it repeats itself until
it fill all the available space?)
2. To change all the images to realize the rollover effect
3. Trying to add an EventBox to the main window I noticed that it's grey
and it covers the background image of the window. If I realize the button
using the EventBox I'd like to see the window background image outside the
shape of the button... (I don't know if it's clear... :) )

thanx in advance.
G.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top