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:
authorCarlos Alberto Cortez <calberto.cortez@gmail.com>2007-01-04 23:22:33 +0300
committerCarlos Alberto Cortez <calberto.cortez@gmail.com>2007-01-04 23:22:33 +0300
commit0037f9d7477a3ae585162a3e0713a98e7ffc540f (patch)
tree5f58979f26f121e6d74a1a2b69e63f297517a7fd /mcs/class/Managed.Windows.Forms/System.Windows.Forms/ColumnHeader.cs
parent7686093a3976d4208106cf36353e56590d6eb48e (diff)
2006-01-04 Carlos Alberto Cortez <calberto.cortez@gmail.com>
* ColumnHeader.cs: * ListView.cs: Implement 2.0 ColumnHeader.DisplayIndex property by using the internal information of the columns order in ListView. svn path=/trunk/mcs/; revision=70497
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.cs16
1 files changed, 14 insertions, 2 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 c287171ebc8..807c0f6a794 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ColumnHeader.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ColumnHeader.cs
@@ -170,8 +170,20 @@ namespace System.Windows.Forms
[Localizable (true)]
[RefreshProperties (RefreshProperties.Repaint)]
public int DisplayIndex {
- get { throw new NotImplementedException (); }
- set { throw new NotImplementedException (); }
+ get {
+ if (owner == null)
+ return -1;
+
+ return owner.GetReorderedColumnIndex (this);
+ }
+ set {
+ if (owner == null)
+ return;
+ if (value < 0 || value >= owner.Columns.Count)
+ throw new ArgumentOutOfRangeException ("value");
+
+ owner.ReorderColumn (this, value);
+ }
}
[DefaultValue (-1)]