7 let window = GWindow.window ~title: "radio buttons" ~border_width: 0 () in
8 window#connect#destroy ~callback:Main.quit;
10 let box1 = GPack.vbox ~packing: window#add () in
12 let box2 = GPack.vbox ~spacing:10 ~border_width: 10 ~packing: box1#add () in
14 let button1 = GButton.radio_button ~label:"button1" ~packing: box2#add () in
15 button1#connect#clicked ~callback:(fun () -> prerr_endline "button1");
17 let button2 = GButton.radio_button ~group:button1#group ~label:"button2"
18 ~active:true ~packing: box2#add () in
19 button2#connect#clicked ~callback:(fun () -> prerr_endline "button2");
21 let button3 = GButton.radio_button
22 ~group:button1#group ~label:"button3" ~packing: box2#add () in
23 button3#connect#clicked ~callback:(fun () -> prerr_endline "button3");
26 GMisc.separator `HORIZONTAL ~packing: box1#pack () in
28 let box3 = GPack.vbox ~spacing: 10 ~border_width: 10
29 ~packing: box1#pack () in
31 let button = GButton.button ~label: "close" ~packing: box3#add () in
32 button#connect#clicked ~callback:Main.quit;
33 button#grab_default ();