$tipwindow = $widget->get_tooltip_window(); $tipwindow->modify_bg(Gtk::STATE_NORMAL, GdkColor::parse("#CC0000")); return true; // return false or nothing to NOT show a tooltip } /* Create base window */ $window = new GtkWindow(); $window->set_title('New Tooltip API'); $window->connect_simple('destroy', array('gtk', 'main_quit')); $window->add($vbox = new GtkVBox()); // simple tooltips usage $vbox->add($label = new GtkLabel('I have a plain tooltip')); $label->set_tooltip_text('I am a tooltip, Dave'); // simple tooltips usage with markup $vbox->add($label = new GtkLabel('I have a markup tooltip')); $label->set_tooltip_markup('<i>I am cool and italic</i>'); // text $vbox->add($text = new GtkLabel('Text Tooltip')); $text->set_has_tooltip(true); // $text->set_property('has-tooltip', true); - notice this does the same thing $text->connect('query-tooltip', 'texttip'); // markup $vbox->add($text = new GtkLabel('Markup Tooltip')); $text->set_has_tooltip(true); $text->connect('query-tooltip', 'markuptip'); // icon $vbox->add($text = new GtkLabel('Icon Tooltip')); $text->set_has_tooltip(true); $text->connect('query-tooltip', 'icontip'); // stock $vbox->add($text = new GtkLabel('Stock Icon Tooltip'));