Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordi Mas i Hernandez <jordi@mono-cvs.ximian.com>2005-03-03 15:40:09 +0300
committerJordi Mas i Hernandez <jordi@mono-cvs.ximian.com>2005-03-03 15:40:09 +0300
commitce9ed5b52ac0d9a728f2c61dcd0b85d9c30ab4c5 (patch)
tree04c26a20d1f8f6f8490edd0e61613e5c9849f2e0 /mcs/class/Managed.Windows.Forms/System.Windows.Forms/ColumnHeader.cs
parent4647be84d2c3c8dcfb7b638c2ea4f1d4bb19f625 (diff)
2005-03-03 Jordi Mas i Hernandez <jordi@ximian.com>
* ColumnHeader.cs: - Fixes null string format * ListView.cs: - Adds enum type checks - Fixes redrawing and recalc need after changing some properties - Fixes on focus_item set after the event - Fixes adding columns after the control has been created * ThemeWin32Classic.cs: - Fixes CheckBox focus rectangle - Fixes ColumnHeader drawing svn path=/trunk/mcs/; revision=41396
Diffstat (limited to 'mcs/class/Managed.Windows.Forms/System.Windows.Forms/ColumnHeader.cs')
-rw-r--r--mcs/class/Managed.Windows.Forms/System.Windows.Forms/ColumnHeader.cs9
1 files changed, 4 insertions, 5 deletions
diff --git a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ColumnHeader.cs b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ColumnHeader.cs
index 29e02b6cc9c..714a6e53690 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ColumnHeader.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ColumnHeader.cs
@@ -38,7 +38,7 @@ namespace System.Windows.Forms
public class ColumnHeader : Component, ICloneable
{
#region Instance Variables
- private StringFormat format;
+ private StringFormat format = new StringFormat ();
private string text = "ColumnHeader";
private HorizontalAlignment text_alignment = HorizontalAlignment.Left;
private int width = ThemeEngine.Current.ListViewDefaultColumnWidth;
@@ -102,8 +102,7 @@ namespace System.Windows.Forms
}
internal void CalcColumnHeader ()
- {
- format = new StringFormat ();
+ {
if (text_alignment == HorizontalAlignment.Center)
format.Alignment = StringAlignment.Center;
else if (text_alignment == HorizontalAlignment.Right)
@@ -118,9 +117,9 @@ namespace System.Windows.Forms
if (width >= 0) {
this.column_rect.Width = width;
if (owner != null)
- this.column_rect.Height = owner.Font.Height;
+ this.column_rect.Height = owner.Font.Height + 5 ;
else
- this.column_rect.Height = ThemeEngine.Current.DefaultFont.Height;
+ this.column_rect.Height = ThemeEngine.Current.DefaultFont.Height + 5;
}
else if (this.Index != -1)
this.column_rect.Size = owner.GetChildColumnSize (this.Index);