Re: How to add tool button?



If you want a tool button that can be toggled on and off, you may use
Gtk::RadioButton with 
some special properties set.
See the comments in the following code fragment:


Gtk::RadioButtonGroup group;

Gtk::RadioButton *button = new Gtk::RadioButton();
button->set_group(group);

Glib::FileTest file_test = Glib::FILE_TEST_EXISTS;
if (Glib::file_test("cursor-ellipse.xpm", file_test))
	button->add_pixlabel(pixfile, ""); //no text label

button->set_active(true);
button->set_mode(false); //draw_indicator = false






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