2008-09-03 Ivan N. Zlatev <contact@i-nz.net>
authorIvan Zlatev <ivan@ivanz.com>
Wed, 3 Sep 2008 12:31:46 +0000 (12:31 -0000)
committerIvan Zlatev <ivan@ivanz.com>
Wed, 3 Sep 2008 12:31:46 +0000 (12:31 -0000)
* ButtonBase.cs CheckBox.cs, Control.cs, FlowLayoutPanel.cs,
  FlowLayoutSettings.cs, GroupBox.cs, Label.cs, ListBox.cs,
  PropertyGrid.cs, RadioButton.cs, TableLayoutPanel.cs,
  TableLayoutSettings.cs, ToolStrip.cs, ToolStripDropDownButton.cs,
  ToolStripDropDownMenu.cs, ToolStripItem.cs, ToolStripSplitButton.cs,
  ToolStripStatusLabel.cs: Add missing PerformLayout calls to various
  properties.
  [Fixes bug #418684]

svn path=/trunk/mcs/; revision=112174

19 files changed:
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ButtonBase.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
mcs/class/Managed.Windows.Forms/System.Windows.Forms/CheckBox.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/FlowLayoutPanel.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/FlowLayoutSettings.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/GroupBox.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/Label.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListBox.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/PropertyGrid.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/RadioButton.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/TableLayoutPanel.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/TableLayoutSettings.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStrip.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripDropDownButton.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripDropDownMenu.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripItem.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripSplitButton.cs
mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolStripStatusLabel.cs

index 96599bea9a06ac831d906f9cc3ee2d419afc564c..d45b110d059f55b73ab22525b1317da1503a877f 100644 (file)
@@ -131,6 +131,8 @@ namespace System.Windows.Forms {
                                                text_format_flags |= TextFormatFlags.WordBreak;
                                        }
 
+                                       if (Parent != null)
+                                               Parent.PerformLayout (this, "AutoEllipsis");
                                        this.Invalidate ();
                                }
                        }
@@ -172,6 +174,9 @@ namespace System.Windows.Forms {
                        set { 
                                if (flat_style != value) {
                                        flat_style = value;
+
+                                       if (Parent != null)
+                                               Parent.PerformLayout (this, "FlatStyle");
                                        Invalidate();
                                }
                        }
@@ -430,6 +435,8 @@ namespace System.Windows.Forms {
                        set {
                                if (use_compatible_text_rendering != value) {
                                        use_compatible_text_rendering = value;
+                                       if (Parent != null)
+                                               Parent.PerformLayout (this, "UseCompatibleTextRendering");
                                        Invalidate ();
                                }
                        }
index 3bf2226b04f4198c36b3277a3aa99af524e1e138..af467b049cfe07b9c5deaa93891d64f9d92c66fe 100644 (file)
@@ -1,3 +1,14 @@
+2008-09-03  Ivan N. Zlatev  <contact@i-nz.net>
+
+       * ButtonBase.cs CheckBox.cs, Control.cs, FlowLayoutPanel.cs, 
+         FlowLayoutSettings.cs, GroupBox.cs, Label.cs, ListBox.cs, 
+         PropertyGrid.cs, RadioButton.cs, TableLayoutPanel.cs, 
+         TableLayoutSettings.cs, ToolStrip.cs, ToolStripDropDownButton.cs, 
+         ToolStripDropDownMenu.cs, ToolStripItem.cs, ToolStripSplitButton.cs, 
+         ToolStripStatusLabel.cs: Add missing PerformLayout calls to various 
+         properties.
+         [Fixes bug #418684]
+
 2008-09-03  Neville Gao <nevillegao@gmail.com>
 
        * StatusBar.cs: Control enabled to support accessibility.
index 25149850ba032f6edc5acf5429d8f3d2ad19ecc8..dfd98314f4e396062c12ba3e40453d4244f4016f 100644 (file)
@@ -170,6 +170,9 @@ namespace System.Windows.Forms {
                                if (value != appearance) {
                                        appearance = value;
                                        OnAppearanceChanged (EventArgs.Empty);
+
+                                       if (Parent != null)
+                                               Parent.PerformLayout (this, "Appearance");
                                        Invalidate();
                                }
                        }
@@ -197,7 +200,8 @@ namespace System.Windows.Forms {
                        set {
                                if (value != check_alignment) {
                                        check_alignment = value;
-
+                                       if (Parent != null)
+                                               Parent.PerformLayout (this, "CheckAlign");
                                        Invalidate();
                                }
                        }
index d8b9eb16fd7dd2caba87a63dc24ae810dbec7fcc..625df24d653674f7f51fa031202efc112c68c215 100644 (file)
@@ -2226,9 +2226,13 @@ namespace System.Windows.Forms
                                        auto_size = value;
                                        
                                        // If we're turning this off, reset our size
-                                       if (!value)
+                                       if (!value) {
                                                Size = explicit_bounds.Size;
-                                               
+                                       } else {
+                                               if (Parent != null)
+                                                       Parent.PerformLayout (this, "AutoSize");
+                                       }
+
                                        OnAutoSizeChanged (EventArgs.Empty);
                                }
                        }
@@ -3029,6 +3033,8 @@ namespace System.Windows.Forms
                        set { 
                                if (this.margin != value) {
                                        this.margin = value; 
+                                       if (Parent != null)
+                                               Parent.PerformLayout (this, "Margin");
                                        OnMarginChanged (EventArgs.Empty);
                                }
                        }
index b65861063e81156e6a96bfa27920bdab116f49b8..96901f36d02c4afcc78cc9acbc1eb84513956d44 100644 (file)
@@ -70,7 +70,7 @@ namespace System.Windows.Forms
                internal FlowLayoutSettings LayoutSettings {
                        get { 
                                if (this.settings == null)
-                                       this.settings = new FlowLayoutSettings ();
+                                       this.settings = new FlowLayoutSettings (this);
                                        
                                return this.settings;
                        }
@@ -89,7 +89,6 @@ namespace System.Windows.Forms
                public void SetFlowBreak (Control control, bool value)
                {
                        LayoutSettings.SetFlowBreak (control, value);
-                       this.PerformLayout (control, "FlowBreak");
                }               
                #endregion
                
index 3cdda9c47887747f33ba3ecc82d357126d217178..69ec1d5a56c6c0a234a1225357ef4c48aa9f66c3 100644 (file)
@@ -40,19 +40,31 @@ namespace System.Windows.Forms
                private bool wrap_contents;
                private LayoutEngine layout_engine;
                private Dictionary<object, bool> flow_breaks;
+               private Control owner;
 
-               internal FlowLayoutSettings ()
+               internal FlowLayoutSettings () : this (null)
+               {
+               }
+
+               internal FlowLayoutSettings (Control owner)
                {
                        flow_breaks = new Dictionary<object, bool> ();
                        wrap_contents = true;
                        flow_direction = FlowDirection.LeftToRight;
+                       this.owner = owner;
                }
 
                #region Public Properties
                [DefaultValue (FlowDirection.LeftToRight)]
                public FlowDirection FlowDirection {
                        get { return this.flow_direction; }
-                       set { this.flow_direction = value; }
+                       set { 
+                               if (this.flow_direction != value) {
+                                       this.flow_direction = value;
+                                       if (owner != null)
+                                               owner.PerformLayout (owner, "FlowDirection");
+                               }
+                       }
                }
 
                public override LayoutEngine LayoutEngine {
@@ -67,7 +79,13 @@ namespace System.Windows.Forms
                [DefaultValue (true)]
                public bool WrapContents {
                        get { return this.wrap_contents; }
-                       set { this.wrap_contents = value; }
+                       set { 
+                               if (this.wrap_contents != value) {
+                                       this.wrap_contents = value;
+                                       if (owner != null)
+                                               owner.PerformLayout (owner, "WrapContents");
+                               }
+                       }
                }
                #endregion
 
@@ -85,6 +103,8 @@ namespace System.Windows.Forms
                public void SetFlowBreak (Object child, bool value)
                {
                        flow_breaks[child] = value;
+                       if (owner != null)
+                               owner.PerformLayout ((Control)child, "FlowBreak");
                }
                #endregion
        }
index 73b522b51742446451038d157b8a3d5270dd7469..83c3bb90237a3579ad5cad909a2d85f3b77af8e5 100644 (file)
@@ -307,7 +307,12 @@ namespace System.Windows.Forms
                        }
 
                        set {
-                               use_compatible_text_rendering = value;
+                               if (use_compatible_text_rendering != value) {
+                                       use_compatible_text_rendering = value;
+                                       if (Parent != null)
+                                               Parent.PerformLayout (this, "UseCompatibleTextRendering");
+                                       Invalidate ();
+                               }
                        }
                }
 #endif
index 9c7b62ad7a103c3ce6fd8c3698d68e5e9421a253..63e1eca08e50def53187727422bc5dd99127724c 100644 (file)
@@ -186,6 +186,8 @@ namespace System.Windows.Forms
                                        else
                                                string_format.Trimming = StringTrimming.Character;
 
+                                       if (Parent != null)
+                                               Parent.PerformLayout (this, "AutoEllipsis");
                                        this.Invalidate ();
                                }
                        }
@@ -289,6 +291,8 @@ namespace System.Windows.Forms
                                        return;
 
                                flat_style = value;
+                               if (Parent != null)
+                                       Parent.PerformLayout (this, "FlatStyle");
                                Invalidate ();
                        }
                }
index 49f59b5da80857faec49b570438881f248007b94..727eb4e330117382bca9cf92e29d538e74678aca 100644 (file)
@@ -323,6 +323,8 @@ namespace System.Windows.Forms
                                else
                                        item_heights = null;
 
+                               if (Parent != null)
+                                       Parent.PerformLayout (this, "DrawMode");
                                base.Refresh ();
                        }
                }
index 250bc4ec872051d2f9efe0887be1f10e53d04144..3f1b9f3c8f4b2b71fa4a4853169518897564fcd2 100644 (file)
@@ -762,7 +762,14 @@ namespace System.Windows.Forms
                [DefaultValue (false)]
                public bool UseCompatibleTextRendering {
                        get { return use_compatible_text_rendering; }
-                       set { use_compatible_text_rendering = value; }
+                       set {
+                               if (use_compatible_text_rendering != value) {
+                                       use_compatible_text_rendering = value;
+                                       if (Parent != null)
+                                               Parent.PerformLayout (this, "UseCompatibleTextRendering");
+                                       Invalidate ();
+                               }
+                       }
                }
 #endif
 
index b070afac59736b3e28565321f7859b90ca311801..0ef26cc1576ee1428cd2590e1c9de0c2ccafb348 100644 (file)
@@ -188,6 +188,8 @@ namespace System.Windows.Forms {
                                        EventHandler eh = (EventHandler)(Events [AppearanceChangedEvent]);
                                        if (eh != null)
                                                eh (this, EventArgs.Empty);
+                                       if (Parent != null)
+                                               Parent.PerformLayout (this, "Appearance");
                                        Invalidate();
                                }
                        }
index a4801525ecfaf70f0f8c1cf5b464759d01eef08f..168836082cf67cd84ea955f38c3eca4ab0b13f72 100644 (file)
@@ -96,12 +96,7 @@ namespace System.Windows.Forms
                [DefaultValue (0)]
                public int ColumnCount {
                        get { return settings.ColumnCount; }
-                       set {
-                               if (settings.ColumnCount != value) {
-                                       settings.ColumnCount = value; 
-                                       this.PerformLayout (this, "ColumnCount");
-                               }
-                       }
+                       set { settings.ColumnCount = value; }
                }
 
                [Browsable (false)]
@@ -121,12 +116,7 @@ namespace System.Windows.Forms
                [DefaultValue (TableLayoutPanelGrowStyle.AddRows)]
                public TableLayoutPanelGrowStyle GrowStyle {
                        get { return settings.GrowStyle; }
-                       set { 
-                               if (settings.GrowStyle != value) {
-                                       settings.GrowStyle = value;
-                                       PerformLayout (this, "GrowStyle");
-                               }
-                       }
+                       set { settings.GrowStyle = value; }
                }
 
                public override System.Windows.Forms.Layout.LayoutEngine LayoutEngine {
@@ -155,12 +145,7 @@ namespace System.Windows.Forms
                [DefaultValue (0)]
                public int RowCount {
                        get { return settings.RowCount; }
-                       set {
-                               if (settings.RowCount != value) {
-                                       settings.RowCount = value; 
-                                       this.PerformLayout (this, "RowCount");
-                               }
-                       }
+                       set { settings.RowCount = value; }
                }
 
                [Browsable (false)]
@@ -252,31 +237,26 @@ namespace System.Windows.Forms
                public void SetCellPosition (Control control, TableLayoutPanelCellPosition position)
                {
                        settings.SetCellPosition (control, position);
-                       this.PerformLayout ();
                }
 
                public void SetColumn (Control control, int column)
                {
                        settings.SetColumn (control, column);
-                       this.PerformLayout ();
                }
 
                public void SetColumnSpan (Control control, int value)
                {
                        settings.SetColumnSpan (control, value);
-                       this.PerformLayout ();
                }
 
                public void SetRow (Control control, int row)
                {
                        settings.SetRow (control, row);
-                       this.PerformLayout ();
                }
 
                public void SetRowSpan (Control control, int value)
                {
                        settings.SetRowSpan (control, value);
-                       this.PerformLayout ();
                }
                #endregion
 
@@ -526,7 +506,7 @@ namespace System.Windows.Forms
 
                internal override Size GetPreferredSizeCore (Size proposedSize)
                {
-                       // If the tablelayoutpanel is autosize, we have to make sure it is big enough
+                       // If the tablelayoutowner is autosize, we have to make sure it is big enough
                        // to hold every non-autosize control
                        actual_positions = (LayoutEngine as TableLayout).CalculateControlPositions (this, Math.Max (ColumnCount, 1), Math.Max (RowCount, 1));
                        
@@ -534,7 +514,7 @@ namespace System.Windows.Forms
                        int actual_cols = actual_positions.GetLength (0);
                        int actual_rows = actual_positions.GetLength (1);
                        
-                       // Figure out how wide the panel needs to be
+                       // Figure out how wide the owner needs to be
                        int[] column_widths = new int[actual_cols];
                        float total_column_percentage = 0f;
                        
@@ -560,7 +540,7 @@ namespace System.Windows.Forms
                        }
 
                        // Because percentage based rows divy up the remaining space,
-                       // we have to make the panel big enough so that all the rows
+                       // we have to make the owner big enough so that all the rows
                        // get bigger, even if we only need one to be bigger.
                        int non_percent_total_width = 0;
                        int percent_total_width = 0;
@@ -573,7 +553,7 @@ namespace System.Windows.Forms
                        }
 
 
-                       // Figure out how tall the panel needs to be
+                       // Figure out how tall the owner needs to be
                        int[] row_heights = new int[actual_rows];
                        float total_row_percentage = 0f;
                
@@ -599,7 +579,7 @@ namespace System.Windows.Forms
                        }
                        
                        // Because percentage based rows divy up the remaining space,
-                       // we have to make the panel big enough so that all the rows
+                       // we have to make the owner big enough so that all the rows
                        // get bigger, even if we only need one to be bigger.
                        int non_percent_total_height = 0;
                        int percent_total_height = 0;
index 253b23890e920c05ffb54b71b579bda31de5149c..3f1fbb14d0ca0d5e7720781f626a8dffdaf31cd9 100644 (file)
@@ -95,7 +95,10 @@ namespace System.Windows.Forms
                                if (value < 0)
                                        throw new ArgumentOutOfRangeException();
                                        
-                               column_count = value;
+                               if (column_count != value) {
+                                       column_count = value;
+                                       panel.PerformLayout (panel, "ColumnCount");
+                               }
                        }
                }
 
@@ -111,7 +114,10 @@ namespace System.Windows.Forms
                                if (!Enum.IsDefined (typeof(TableLayoutPanelGrowStyle), value))
                                        throw new ArgumentException();
                                        
-                               grow_style = value;
+                               if (grow_style != value) {
+                                       grow_style = value;
+                                       panel.PerformLayout (panel, "GrowStyle");
+                               }
                        }
                }
                
@@ -125,7 +131,11 @@ namespace System.Windows.Forms
                        set {
                                if (value < 0)
                                        throw new ArgumentOutOfRangeException ();
-                               row_count = value;
+
+                               if (row_count != value) {
+                                       row_count = value;
+                                       panel.PerformLayout (panel, "RowCount");
+                               }
                        }
                }
 
@@ -215,6 +225,7 @@ namespace System.Windows.Forms
 
                        columns[control] = cellPosition.Column;
                        rows[control] = cellPosition.Row;
+                       panel.PerformLayout ();
                }
 
                public void SetColumn (Object control, int column)
@@ -225,6 +236,7 @@ namespace System.Windows.Forms
                                throw new ArgumentException ();
                                
                        columns[control] = column;
+                       panel.PerformLayout ();
                }
 
                public void SetColumnSpan (Object control, int value)
@@ -235,6 +247,7 @@ namespace System.Windows.Forms
                                throw new ArgumentException ();
 
                        column_spans[control] = value;
+                       panel.PerformLayout ();
                }
 
                public void SetRow (Object control, int row)
@@ -245,6 +258,7 @@ namespace System.Windows.Forms
                                throw new ArgumentException ();
 
                        rows[control] = row;
+                       panel.PerformLayout ();
                }
 
                public void SetRowSpan (Object control, int value)
@@ -255,6 +269,7 @@ namespace System.Windows.Forms
                                throw new ArgumentException ();
 
                        row_spans[control] = value;
+                       panel.PerformLayout ();
                }
                #endregion
 
index 13be4db4e6eed4c5fd08933d2d4be5569e0160fb..ba696e99b388507901082655bc5d58adae4e0792 100644 (file)
@@ -335,7 +335,7 @@ namespace System.Windows.Forms
                                        if (!Enum.IsDefined (typeof (ToolStripGripStyle), value))
                                                throw new InvalidEnumArgumentException (string.Format ("Enum argument value '{0}' is not valid for ToolStripGripStyle", value));
                                        this.grip_style = value;
-                                       this.PerformLayout ();
+                                       this.PerformLayout (this, "GripStyle");
                                }
                        }
                }
@@ -403,7 +403,12 @@ namespace System.Windows.Forms
                [DesignerSerializationVisibility (DesignerSerializationVisibility.Hidden)]
                public LayoutSettings LayoutSettings {
                        get { return this.layout_settings; }
-                       set { this.layout_settings = value; }
+                       set { 
+                               if (this.layout_settings != value) {
+                                       this.layout_settings = value;
+                                       PerformLayout (this, "LayoutSettings");
+                               }
+                       }
                }
                
                [AmbientValue (ToolStripLayoutStyle.StackWithOverflow)]
@@ -435,7 +440,7 @@ namespace System.Windows.Forms
                                                
                                        this.layout_settings = this.CreateLayoutSettings (value);
                                        
-                                       this.PerformLayout ();
+                                       this.PerformLayout (this, "LayoutStyle");
                                        this.OnLayoutStyleChanged (EventArgs.Empty);
                                }
                        }
@@ -465,7 +470,7 @@ namespace System.Windows.Forms
                                if (this.renderer != value) {
                                        this.renderer = value; 
                                        this.render_mode = ToolStripRenderMode.Custom;
-                                       this.PerformLayout ();
+                                       this.PerformLayout (this, "Renderer");
                                        this.OnRendererChanged (EventArgs.Empty);
                                }
                        }
@@ -704,7 +709,7 @@ namespace System.Windows.Forms
                {
                        switch (layoutStyle) {
                                case ToolStripLayoutStyle.Flow:
-                                       return new FlowLayoutSettings ();
+                                       return new FlowLayoutSettings (this);
                                case ToolStripLayoutStyle.Table:
                                        //return new TableLayoutSettings ();
                                case ToolStripLayoutStyle.StackWithOverflow:
index 59386803fed60f0f97f6d9778fe91ba18940654e..b578689192c8075775af8e51b29a0b37cf020082 100644 (file)
@@ -86,7 +86,12 @@ namespace System.Windows.Forms
                [DefaultValue (true)]
                public bool ShowDropDownArrow {
                        get { return this.show_drop_down_arrow; }
-                       set { this.show_drop_down_arrow = value; }
+                       set { 
+                               if (this.show_drop_down_arrow != value) {
+                                       this.show_drop_down_arrow = value;
+                                       CalculateAutoSize ();
+                               }
+                       }
                }
                #endregion
 
index 19c5af12f74d1f4d184d2bacfd735779e1c5aa8c..6022c140b1d310a335a7646782c3e5dd01d626c6 100644 (file)
@@ -68,13 +68,23 @@ namespace System.Windows.Forms
                [DefaultValue (false)]
                public bool ShowCheckMargin {
                        get { return this.show_check_margin; }
-                       set { this.show_check_margin = value; }
+                       set { 
+                               if (this.show_check_margin != value) {
+                                       this.show_check_margin = value;
+                                       PerformLayout (this, "ShowCheckMargin");
+                               }
+                       }
                }
 
                [DefaultValue (true)]
                public bool ShowImageMargin {
                        get { return this.show_image_margin; }
-                       set { this.show_image_margin = value; }
+                       set { 
+                               if (this.show_image_margin != value) {
+                                       this.show_image_margin = value;
+                                       PerformLayout (this, "ShowImageMargin");
+                               }
+                       }
                }
                #endregion
 
index e8850562120a5b5a17736c661dc2652978bc0fbd..247b056502b3b9c985dc03f9a79a927492f93dfa 100644 (file)
@@ -217,7 +217,10 @@ namespace System.Windows.Forms
                                if (!Enum.IsDefined (typeof (ToolStripItemAlignment), value))
                                        throw new InvalidEnumArgumentException (string.Format ("Enum argument value '{0}' is not valid for ToolStripItemAlignment", value));
 
-                               this.alignment = value;
+                               if (this.alignment != value) {
+                                       this.alignment = value;
+                                       this.CalculateAutoSize (); 
+                               }
                        }
                }
 
@@ -340,8 +343,6 @@ namespace System.Windows.Forms
                                        this.display_style = value; 
                                        this.CalculateAutoSize (); 
                                        OnDisplayStyleChanged (EventArgs.Empty);
-                                       if (this.Parent != null)
-                                               this.Parent.PerformLayout ();
                                }
                        }
                }
@@ -477,8 +478,10 @@ namespace System.Windows.Forms
                                if (!Enum.IsDefined (typeof (ContentAlignment), value))
                                        throw new InvalidEnumArgumentException (string.Format ("Enum argument value '{0}' is not valid for ContentAlignment", value));
 
-                               this.image_align = value;
-                               this.Invalidate ();
+                               if (image_align != value) {
+                                       this.image_align = value;
+                                       this.CalculateAutoSize (); 
+                               }
                        }
                }
 
@@ -529,9 +532,10 @@ namespace System.Windows.Forms
                public ToolStripItemImageScaling ImageScaling {
                        get { return this.image_scaling; }
                        set { 
-                               this.image_scaling = value; 
-                               this.CalculateAutoSize (); 
-                               this.Invalidate (); 
+                               if (image_scaling != value) {
+                                       this.image_scaling = value; 
+                                       this.CalculateAutoSize (); 
+                               }
                        }
                }
 
@@ -720,8 +724,11 @@ namespace System.Windows.Forms
                        set {
                                if (!Enum.IsDefined (typeof (ContentAlignment), value))
                                        throw new InvalidEnumArgumentException (string.Format ("Enum argument value '{0}' is not valid for ContentAlignment", value));
-                               this.text_align = value;
-                               this.Invalidate ();
+
+                               if (this.text_align != value) {
+                                       this.text_align = value;
+                                       this.CalculateAutoSize (); 
+                               }
                        }
                }
 
index 6a2c33bb1b03b0c719e71739a6c7b3baeebfe029..a280a907ec18ae52b404fab5fbacbaba1d816b76 100644 (file)
@@ -136,8 +136,10 @@ namespace System.Windows.Forms
                        set { 
                                if (value < 0)
                                        throw new ArgumentOutOfRangeException ();
-                                       
-                               this.drop_down_button_width = value;
+                               if (this.drop_down_button_width != value) {
+                                       this.drop_down_button_width = value;
+                                       CalculateAutoSize ();
+                               }
                        }
                }
 
index 33125190fe83638679d2e0e6c24d22bc5baede80..5f201a849c62852f1dc18b55e43ede538320d90c 100644 (file)
@@ -98,7 +98,12 @@ namespace System.Windows.Forms
                [DefaultValue (false)]
                public bool Spring {
                        get { return this.spring; }
-                       set { this.spring = value; }
+                       set {
+                               if (this.spring != value) {
+                                       this.spring = value;
+                                       CalculateAutoSize ();
+                               }
+                       }
                }
                #endregion