Help needed with on_event_expose() function



Hi!

I am trying to develop my own button in order to get the desired custom look of a button. I have derived my widget from Gtk::Button, overridden the on_expose_event() function and used Cairo to draw my button. Everything works fine (well, almost everything), my custom button looks the way I want it to look and it works nicely also.

The problem I am having is that I am unable to display the button's child widget (most of the time it is a Gtk::Label).

I realize that the problem is in the fact that I have overriden the on_expose_event() function. I am able to display the button's child if I call the Gtk::Button's on_expose_event() function inside my own on_expose_event() function. In such a case the child widget actually appears, but with it also the original look of the Gtk::Button and because of that my custom look is overridden.
 
The part I need help with is: I would like to preserve my button's custom look and also be able to display the button's child widget. Can anyone help me with this problem?

Thanks for all your answers,
Uros



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