Re: tooltip for gtkdrawingarea
- From: muppet <scott asofyet org>
- To: "Riswick, J.G.A. van" <J G A v Riswick tue nl>
- Cc: "'gtk-perl-list gnome org'" <gtk-perl-list gnome org>
- Subject: Re: tooltip for gtkdrawingarea
- Date: Sat, 22 Jun 2002 23:00:13 -0400
Riswick, J.G.A. van wrote:
HI
I tried to bind a tooltip to a gtkdrawingarea, like so:
$win = new Gtk::Window;
$win->set_usize(300,200);
$win->show_all;
$but = new Gtk::DrawingArea;
$but->show;
$win->add($but);
$but->add_events ( 'enter-notify-mask' );
$but->add_events ( 'leave-notify-mask' );
my $tooltip = new Gtk::Tooltips();
$tooltip->set_tip
( $but, "test", "test" );
$tooltip->enable;
$tooltip->set_delay(0);
(and of course, Gtk->main; )
now it works.
basically, the Gtk::DrawingArea starts off with a very minimal set of
events, so you need to add the ones you want. i guessed at
'enter-notify', and the tooltip won't go away unless you also have
'leave-notify'.
-- ttocs
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]