also, disable the call do BindColumns in
[mono.git] / mcs / class / Managed.Windows.Forms / System.Windows.Forms / ColumnStyle.cs
index ce793339487b7ba948a69b8a431f4933e43bf46d..9cc8dbd07fc68b3b111590ed4b3e7638c9db6229 100644 (file)
@@ -1,3 +1,6 @@
+//
+// ColumnStyle.cs
+//
 // Permission is hereby granted, free of charge, to any person obtaining
 // a copy of this software and associated documentation files (the
 // "Software"), to deal in the Software without restriction, including
 //
 // (C) 2004 Novell, Inc.
 //
-
 #if NET_2_0
-namespace System.Windows.Forms {
-
-       public class ColumnStyle : TableLayoutStyle {
+namespace System.Windows.Forms 
+{
+       public class ColumnStyle : TableLayoutStyle 
+       {
                float width;
                
                public ColumnStyle ()
                {
+                       this.width = 0;
                }
 
-               public ColumnStyle (SizeType st
+               public ColumnStyle (SizeType sizeType
                {
-                       size_type = st;
+                       this.width = 0;
+                       base.SizeType = sizeType;
                }
 
-               public ColumnStyle (SizeType st, float width)
+               public ColumnStyle (SizeType sizeType, float width)
                {
-                       size_type = st;
+                       if (width < 0)
+                               throw new ArgumentOutOfRangeException ("height");
+
+                       base.SizeType = sizeType;
                        this.width = width;
                }
 
                public float Width {
-                       get {
-                               return width;
-                       }
-
-                       set {
-                               width = value;
+                       get { return this.width; }
+                       set { 
+                               if (value < 0)
+                                       throw new ArgumentOutOfRangeException ();
+                               
+                               width = value; 
                        }
                }
        }