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>2006-12-19 23:58:52 +0300
committerCarlos Alberto Cortez <calberto.cortez@gmail.com>2006-12-19 23:58:52 +0300
commitbaf40c1325bf9c9bc12704b5b2fc7db3672be515 (patch)
tree0a0078667a8c1b3ced32d3bfbe5a46bbce463529 /mcs/class/Managed.Windows.Forms/System.Windows.Forms/ColumnHeader.cs
parent602b92bce886a7515400d76826d155978c989897 (diff)
2006-12-19 Carlos Alberto Cortez <calberto.cortez@gmail.com>
* ColumnHeader.cs: Add Tag, Name, ImageKey, ImageIndex, and Image List 2.0 members for ColummnHeader. * ListView.cs: Add key-related 2.0 methods for ColumnHeaderCollection. svn path=/trunk/mcs/; revision=69778
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.cs85
1 files changed, 85 insertions, 0 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 16728e8d8cc..e63dbcfca30 100644
--- a/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ColumnHeader.cs
+++ b/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ColumnHeader.cs
@@ -42,6 +42,12 @@ namespace System.Windows.Forms
private string text = "ColumnHeader";
private HorizontalAlignment text_alignment = HorizontalAlignment.Left;
private int width = ThemeEngine.Current.ListViewDefaultColumnWidth;
+#if NET_2_0
+ private int image_index = -1;
+ private string image_key = String.Empty;
+ private string name = String.Empty;
+ private object tag;
+#endif
// internal variables
internal Rectangle column_rect = Rectangle.Empty;
@@ -59,10 +65,33 @@ namespace System.Windows.Forms
this.text_alignment = alignment;
CalcColumnHeader ();
}
+
+#if NET_2_0
+ internal ColumnHeader (string key, string text, int width, HorizontalAlignment textAlign)
+ {
+ Name = key;
+ Text = text;
+ this.width = width;
+ this.text_alignment = textAlign;
+ CalcColumnHeader ();
+ }
+#endif
#endregion // Internal Constructor
#region Public Constructors
public ColumnHeader () { }
+
+#if NET_2_0
+ public ColumnHeader (int imageIndex)
+ {
+ ImageIndex = imageIndex;
+ }
+
+ public ColumnHeader (string imageKey)
+ {
+ ImageKey = imageKey;
+ }
+#endif
#endregion // Public Constructors
#region Private Internal Methods Properties
@@ -129,6 +158,40 @@ namespace System.Windows.Forms
#endregion // Private Internal Methods Properties
#region Public Instance Properties
+#if NET_2_0
+ public int ImageIndex {
+ get {
+ return image_index;
+ }
+ set {
+ if (value < -1)
+ throw new ArgumentOutOfRangeException ("value");
+
+ image_index = value;
+ image_key = String.Empty;
+ }
+ }
+
+ public string ImageKey {
+ get {
+ return image_key;
+ }
+ set {
+ image_key = value == null ? String.Empty : value;
+ image_index = -1;
+ }
+ }
+
+ public ImageList ImageList {
+ get {
+ if (owner == null)
+ return null;
+
+ return owner.SmallImageList;
+ }
+ }
+#endif
+
[Browsable (false)]
public int Index {
get {
@@ -145,6 +208,28 @@ namespace System.Windows.Forms
get { return owner; }
}
+#if NET_2_0
+ public string Name {
+ get {
+ return name;
+ }
+ set {
+ name = value == null ? String.Empty : value;
+ }
+ }
+
+ [LocalizableAttribute (false)]
+ [BindableAttribute (true)]
+ public object Tag {
+ get {
+ return tag;
+ }
+ set {
+ tag = value;
+ }
+ }
+#endif
+
[Localizable (true)]
public string Text {
get { return text; }