Re: A flashing button



Antony Stace <antony claire co jp> writes:

I need to create a special type of button.  The button will have a
picture(1) on it which I will make, when the user clicks on the button
the button should change to another picture(2) which I will supply, when
the user releases the mouse button picture(1) will be displayed again. 
This button can also be in two states, in state one it will behave like
a normal button, when in the other state it will blink between
picture(1) and picture(3).  What would be the best way to do this.


Put a GtkPixmap in the button; when the button gets the "pressed"
signal switch pictures, when it gets "released" switch pictures back.

For the blink, use a timeout (g_timeout_add()).

Havoc




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]