PyGTK - Rollover Buttons

Discussion in 'Python' started by Gepi Solo, Sep 7, 2006.

  1. Gepi Solo

    Gepi Solo Guest

    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.
    Gepi Solo, Sep 7, 2006
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dave

    rollover buttons

    dave, May 12, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    1,399
  2. Leythos
    Replies:
    4
    Views:
    3,582
    Leythos
    Mar 30, 2005
  3. Doug
    Replies:
    2
    Views:
    401
  4. Keith G Hicks

    trouble with rollover buttons on master page

    Keith G Hicks, Mar 27, 2008, in forum: ASP .Net
    Replies:
    4
    Views:
    528
    Keith G Hicks
    Mar 28, 2008
  5. JR

    Value of Rollover Submit Buttons

    JR, Mar 4, 2004, in forum: Javascript
    Replies:
    0
    Views:
    94
Loading...

Share This Page