mikshaw


Group: Members
Posts: 4856
Joined: July 2004 |
 |
Posted: Jan. 24 2007,22:22 |
 |
Something like this might help?
Code Sample | function catfood(self) foodcat=self:label(); print(foodcat); end
w=fltk.Fl_Window(300,100,"catfood"); selbc = fltk:Fl_Round_Button(30,20,18,25,"Breads_Cereals") selbc:type(fltk.FL_RADIO_BUTTON); selbc:callback(catfood); -- selmd = fltk:Fl_Round_Button(160,20,18,25,"Main Dishes") selmd:type(fltk.FL_RADIO_BUTTON); selmd:callback(catfood); -- selveg = fltk:Fl_Round_Button(30,40,18,25,"Vegetables") selveg:type(fltk.FL_RADIO_BUTTON); selveg:callback(catfood); -- selmisc = fltk:Fl_Round_Button(160,40,18,25,"Miscellaneous") selmisc:type(fltk.FL_RADIO_BUTTON); selmisc:callback(catfood);
w:show(); Fl:run();
|
If you have multiple sets of radio buttons you'll probably need to create a unique group for each set of buttons. Also, this example uses the label of each button to determine the value of foodcat
-------------- http://www.tldp.org/LDP/intro-linux/html/index.html
|