Re: tooltip for gtkdrawingarea



"Riswick, J.G.A. van" wrote:

HI

I tried to bind a tooltip to a gtkdrawingarea, like so:
[...]
but it doesn't work. Is it at all possible to do this?
Hi Jos,

I reckon that you need to add an event box and then add the drawing area
to that so that there is an X Window and events are dealt with.

so:

 my $eventbox = new Gtk::EventBox;
 $window->add($eventbox1);
 $eventbox->show;

 my $drawingarea = new Gtk::DrawingArea;
 $eventbox->add($drawingarea);
 $drawingarea->show;
 $drawingarea->set_usize(200, 100 );    

 $tooltips->set_tip($eventbox1, 'drawing area 1');

I hope that I have not made silly errors :)

regards, Dermot




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