problem with radiotoolbutton



Hi, I just tried  gtkmm2.4's radiotoolbutton (in the
old style other than using UIManager). But it does not
work as expected. The two radio buttons in a group are
both "active" by default, and donot respond to mouse
click. Have I done anything wrong?  

Cheers,
Dan
------------------------------------------
//g++ `pkg-config gtkmm-2.4 --libs --cflags`
//testToggleToolbutton.cc

#include <gtkmm.h>

int main(int argc, char *argv[])
{
 Gtk::Main kit=Gtk::Main (argc, argv);
 Gtk::Window mainWnd;
 Gtk::Toolbar toolbar;
 
 Gtk::RadioButtonGroup group;
 toolbar.append(*Gtk::manage(new
Gtk::RadioToolButton(group,"R1")));
 toolbar.append(*Gtk::manage(new
Gtk::RadioToolButton(group,"R2")));
 mainWnd.set_size_request(100,50);
 mainWnd.add(toolbar);
 mainWnd.show_all();
 kit.run(mainWnd);
}

=====
----------------------------------------------------------
Have fun!
__________________________________________________________


		
__________________________________ 
Do you Yahoo!? 
Meet the all-new My Yahoo! - Try it today! 
http://my.yahoo.com 
 




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