Mercurial > projects > dynamin
comparison dynamin/gui/radio_button.d @ 65:7c5c50a06ffe
Add setGroup() for RadioButtons
author | Jordan Miner <jminer7@gmail.com> |
---|---|
date | Sat, 08 Aug 2009 22:33:18 -0500 |
parents | c138461bf845 |
children | 73060bc3f004 |
comparison
equal
deleted
inserted
replaced
64:aa7eafe2865d | 65:7c5c50a06ffe |
---|---|
117 */ | 117 */ |
118 int group() { return _group; } | 118 int group() { return _group; } |
119 /// ditto | 119 /// ditto |
120 void group(int i) { _group = i; } | 120 void group(int i) { _group = i; } |
121 } | 121 } |
122 | |
123 /** | |
124 * Simply sets every radio button to have the specified group. | |
125 * | |
126 * Example: | |
127 * ----- | |
128 * auto radioButton1 = new RadioButton; | |
129 * auto radioButton2 = new RadioButton; | |
130 * setGroup(7, radioButton1, radioButton2); | |
131 * ----- | |
132 */ | |
133 void setGroup(int group, RadioButton[] radios...) { | |
134 foreach(r; radios) | |
135 r.group = group; | |
136 } | |
137 |