Re: A flashing button



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.

- state one:

button_press_event callback when button is pressed,
then show pixmap 1

button_release_event when button is released
then change pixmap 2

- state two:

gtk_add_timeout with 1000ms aprox. to call function,
then change pixmap 1, then 2, in rotation

Carlos




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