Mercurial > projects > dynamin
changeset 65:7c5c50a06ffe
Add setGroup() for RadioButtons
author | Jordan Miner <jminer7@gmail.com> |
---|---|
date | Sat, 08 Aug 2009 22:33:18 -0500 |
parents | aa7eafe2865d |
children | 4c095424a9ab |
files | dynamin/gui/radio_button.d |
diffstat | 1 files changed, 16 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/dynamin/gui/radio_button.d Sat Aug 08 22:32:14 2009 -0500 +++ b/dynamin/gui/radio_button.d Sat Aug 08 22:33:18 2009 -0500 @@ -119,3 +119,19 @@ /// ditto void group(int i) { _group = i; } } + +/** + * Simply sets every radio button to have the specified group. + * + * Example: + * ----- + * auto radioButton1 = new RadioButton; + * auto radioButton2 = new RadioButton; + * setGroup(7, radioButton1, radioButton2); + * ----- + */ +void setGroup(int group, RadioButton[] radios...) { + foreach(r; radios) + r.group = group; +} +