Re: [gtkmm] Tooltips on Toolbuttons



On Sat, 2004-10-02 at 19:53, Chris Vine wrote:
> It wasn't attached.

Yes it was!  You're imagining things!  I'm not crazy!  I'm not!  I'm
perfectly fine, apart...from...this..twitch...

Sorry ;-)
#include <gtkmm.h>

int main(int argc, char** argv)
{
	Gtk::Main kit(argc,argv);

	Gtk::Window win;
	Gtk::VBox box;
	Gtk::Toolbar bar;

	win.add(box);
	box.pack_start(bar,false,false);
	bar.set_tooltips(true);

	Gtk::ToolButton button;
	Gtk::Tooltips * bartips = bar.get_tooltips_object();

	// Doesn't work
	//bartips->set_tip(button,"I was set with set_tip");
	//
	// Works
	button.set_tooltip(*bartips,"I was set with set_tooltip");

	bar.append(button);

	win.show_all();
	Gtk::Main::run(win);

	return 0;
}


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