I would like to create a button that I can control the look of the button using pyGTK. How would I go about doing this?
I would like to be able to point to a new image for each 'state' the button is in (i.e. Pressed, mouse over, normal...etc.)
I would like to create a button that I can control the look of the button using pyGTK. How would I go about doing this?
I would like to be able to point to a new image for each 'state' the button is in (i.e. Pressed, mouse over, normal...etc.)
As described in the API documentation for gtk.Image
, "If you want to receive events on the image, such as button clicks, place the image inside a gtk.EventBox, then connect to the event signals on the event box.".
You probably want to use a gtk.Image
rather than a gtk.Button
, since buttons require more knowledge of how the theming engine works. If you really want to use a button, you'll need to read up on gtk rc files and the APIs for manipulating them.