diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2016-02-17 08:44:34 +0100 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2016-02-17 08:44:34 +0100 |
| commit | a8156b149f2e4a3c087bcb090db293d08116bd67 (patch) | |
| tree | 51dd4165422863f70c656de8e0bbfa7c079142bb /src/GraphicObjects/RadioButton.cs | |
| parent | 3c1dbdbbc58d38d45276e3147c3717d19a69adf2 (diff) | |
| parent | bf27b88a6cbfcc65d7ed6360f9193d52f96b1598 (diff) | |
Merge branch 'DefTemplateSizing0'
Diffstat (limited to 'src/GraphicObjects/RadioButton.cs')
| -rw-r--r-- | src/GraphicObjects/RadioButton.cs | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/src/GraphicObjects/RadioButton.cs b/src/GraphicObjects/RadioButton.cs index 297b4c2b..4fd45c58 100644 --- a/src/GraphicObjects/RadioButton.cs +++ b/src/GraphicObjects/RadioButton.cs @@ -1,18 +1,7 @@ using System; - - -using System.Collections.Generic; -using System.Linq; -using System.Text; -//using OpenTK.Graphics.OpenGL; - -using Cairo; - -using winColors = System.Drawing.Color; -using System.Diagnostics; -using System.Xml.Serialization; using OpenTK.Input; using System.ComponentModel; +using System.Xml.Serialization; namespace Crow { @@ -31,17 +20,12 @@ namespace Crow public event EventHandler Unchecked; #region GraphicObject overrides - [XmlAttributeAttribute()][DefaultValue(true)]//overiden to get default to true + [XmlAttributeAttribute()][DefaultValue(true)] public override bool Focusable { get { return base.Focusable; } set { base.Focusable = value; } } - [XmlAttributeAttribute()][DefaultValue(-1)] - public override int Height { - get { return base.Height; } - set { base.Height = value; } - } #endregion [XmlAttributeAttribute()][DefaultValue("RadioButton")] @@ -91,8 +75,12 @@ namespace Crow { Group pg = Parent as Group; if (pg != null) { - foreach (RadioButton c in pg.Children.OfType<RadioButton>()) + for (int i = 0; i < pg.Children.Count; i++) { + RadioButton c = pg.Children [i] as RadioButton; + if (c == null) + continue; c.IsChecked = (c == this); + } } else IsChecked = !IsChecked; |