-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathRadioButton.cpp
46 lines (38 loc) · 1.09 KB
/
RadioButton.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#include <gtkmm.h>
using namespace Glib;
using namespace Gtk;
class Form : public Window {
public:
Form() {
add(scrolledWindow);
scrolledWindow.add(fixed);
radioButton1.set_label("radioButton 1");
radioButton1.set_active(true);
radioButton1.set_group(radioButtonGroup1);
fixed.add(radioButton1);
fixed.move(radioButton1, 30, 30);
radioButton2.set_label("radioButton 2");
radioButton2.set_group(radioButtonGroup1);
fixed.add(radioButton2);
fixed.move(radioButton2, 30, 60);
radioButton3.set_label("radioButton 3");
radioButton3.set_group(radioButtonGroup1);
fixed.add(radioButton3);
fixed.move(radioButton3, 30, 90);
set_title("RadioButton example");
resize(300, 300);
show_all();
}
private:
Fixed fixed;
ScrolledWindow scrolledWindow;
RadioButtonGroup radioButtonGroup1;
RadioButton radioButton1;
RadioButton radioButton2;
RadioButton radioButton3;
};
int main(int argc, char* argv[]) {
RefPtr<Application> application = Application::create(argc, argv);
Form form;
return application->run(form);
}