Re: Is Gtk2::Label clickable?



A. Pagaltzis said:
* Emmanuele Bassi <bassi-e libero it> [2004-07-15 17:33]:
Since a Gtk2::Label inherits from the Gtk2::Widget class, just
connect a callback to the button-press-event, and check the
Gtk2::Gdk::Event that is passed to that callback.

Don't you have to pack it into an EventBox?

yes. you need to create an event box placing it where you want the label to be
and then put the label in it.

i will second that you shouldn't do this without good reason. buttons are
buttons for a reason, people won't expect to be able to click on a label. that
being said it's your app.

-rm



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