Author: rolf
Date: 2007-05-31 10:05:48 -0400 (Thu, 31 May 2007)
New Revision: 78334
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/CheckedListBox.cs
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ComboBox.cs
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListBox.cs
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListControl.cs
Log:
* CheckedListBox.cs, ListBox.cs, ListControl.cs, ComboBox.cs:
Implemented more 2.0 members.
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-05-31 14:02:29 UTC (rev 78333)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-05-31 14:05:48 UTC (rev 78334)
@@ -1,5 +1,10 @@
2007-05-31 Rolf Bjarne Kvinge <[EMAIL PROTECTED]>
+ * CheckedListBox.cs, ListBox.cs, ListControl.cs, ComboBox.cs:
+ Implemented more 2.0 members.
+
+2007-05-31 Rolf Bjarne Kvinge <[EMAIL PROTECTED]>
+
* Application.cs: Try to avoid NRE when Assembly.GetEntryAssembly is
null (strange, but it seems to happen when running unit tests).
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/CheckedListBox.cs
===================================================================
---
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/CheckedListBox.cs
2007-05-31 14:02:29 UTC (rev 78333)
+++
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/CheckedListBox.cs
2007-05-31 14:05:48 UTC (rev 78334)
@@ -37,6 +37,7 @@
#if NET_2_0
[ClassInterface (ClassInterfaceType.AutoDispatch)]
[ComVisible (true)]
+ [LookupBindingPropertiesAttribute ()]
#endif
public class CheckedListBox : ListBox
{
@@ -107,6 +108,15 @@
add { Events.AddHandler (ItemCheckEvent, value); }
remove { Events.RemoveHandler (ItemCheckEvent, value); }
}
+
+#if NET_2_0
+ [Browsable (true)]
+ [EditorBrowsable (EditorBrowsableState.Always)]
+ public new event MouseEventHandler MouseClick {
+ add { base.MouseClick += value; }
+ remove { base.MouseClick -= value; }
+ }
+#endif
#endregion Events
#region Public Properties
@@ -203,6 +213,15 @@
set { base.ValueMember = value; }
}
+#if NET_2_0
+ [Browsable (false)]
+ [EditorBrowsable (EditorBrowsableState.Never)]
+
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
+ public new Padding Padding {
+ get { return base.Padding; }
+ set { base.Padding = value; }
+ }
+#endif
#endregion Public Properties
#region Public Methods
@@ -290,6 +309,14 @@
base.OnSelectedIndexChanged (e);
}
+#if NET_2_0
+ protected override void RefreshItem (int index)
+ {
+ for (int i = 0; i < Items.Count; i++) {
+ RefreshItem (i);
+ }
+ }
+#endif
public void SetItemChecked (int index, bool value)
{
SetItemCheckState (index, value ? CheckState.Checked :
CheckState.Unchecked);
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ComboBox.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ComboBox.cs
2007-05-31 14:02:29 UTC (rev 78333)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ComboBox.cs
2007-05-31 14:05:48 UTC (rev 78334)
@@ -1159,6 +1159,13 @@
}
#if NET_2_0
+ protected override void RefreshItems ()
+ {
+ for (int i = 0; i < Items.Count; i++) {
+ RefreshItem (i);
+ }
+ }
+
public override void ResetText ()
{
Text = String.Empty;
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListBox.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListBox.cs
2007-05-31 14:02:29 UTC (rev 78333)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListBox.cs
2007-05-31 14:05:48 UTC (rev 78334)
@@ -917,6 +917,15 @@
item_heights.Remove (Items [index]);
}
+#if NET_2_0
+ protected override void RefreshItems ()
+ {
+ for (int i = 0; i < Items.Count; i++) {
+ RefreshItem (i);
+ }
+ }
+#endif
+
protected override void SetBoundsCore (int x, int y, int
width, int height, BoundsSpecified specified)
{
if ((specified & BoundsSpecified.Height) ==
BoundsSpecified.Height)
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListControl.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListControl.cs
2007-05-31 14:02:29 UTC (rev 78333)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ListControl.cs
2007-05-31 14:05:48 UTC (rev 78334)
@@ -188,6 +188,7 @@
return;
}
}
+ SelectedIndex = -1;
}
}
@@ -340,6 +341,12 @@
}
protected abstract void RefreshItem (int index);
+
+#if NET_2_0
+ protected virtual void RefreshItems ()
+ {
+ }
+#endif
protected virtual void SetItemCore (int index, object value)
{
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches