Author: jpobst
Date: 2007-03-30 10:37:18 -0500 (Fri, 30 Mar 2007)
New Revision: 75208
Added:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/HScrollProperties.cs
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ScrollProperties.cs
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/VScrollProperties.cs
Modified:
trunk/mcs/class/Managed.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.dll.sources
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ScrollableControl.cs
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms_test.dll.sources
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
Log:
2007-03-30 Jonathan Pobst <[EMAIL PROTECTED]>
* ScollableControl.cs: Add HorizontalScroll and VerticalScroll
properties.
* ScrollProperties.cs, HScrollProperties.cs, VScrollProperties.cs:
Added.
[Based on submitted patch from Olivier Duff.]
2007-03-30 Jonathan Pobst <[EMAIL PROTECTED]>
* System.Windows.Forms.dll.sources: Add ScrollProperties,
HScrollProperties, and VScrollProperties.
* System.Windows.Forms_test.dll.sources: Add HScrollPropertiesTest and
VScrollPropertiesTest.
2007-03-30 Jonathan Pobst <[EMAIL PROTECTED]>
* HScrollPropertiesTest.cs, VScrollPropertiesTest.cs: Added.
Modified: trunk/mcs/class/Managed.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/ChangeLog 2007-03-30 15:35:25 UTC
(rev 75207)
+++ trunk/mcs/class/Managed.Windows.Forms/ChangeLog 2007-03-30 15:37:18 UTC
(rev 75208)
@@ -1,3 +1,10 @@
+2007-03-30 Jonathan Pobst <[EMAIL PROTECTED]>
+
+ * System.Windows.Forms.dll.sources: Add ScrollProperties,
+ HScrollProperties, and VScrollProperties.
+ * System.Windows.Forms_test.dll.sources: Add HScrollPropertiesTest and
+ VScrollPropertiesTest.
+
2007-03-28 Jonathan Pobst <[EMAIL PROTECTED]>
* System.Windows.Forms_test.dll.sources: Add StatusStripTest.cs,
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-03-30 15:35:25 UTC (rev 75207)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-03-30 15:37:18 UTC (rev 75208)
@@ -1,3 +1,9 @@
+2007-03-30 Jonathan Pobst <[EMAIL PROTECTED]>
+
+ * ScollableControl.cs: Add HorizontalScroll and VerticalScroll
properties.
+ * ScrollProperties.cs, HScrollProperties.cs, VScrollProperties.cs:
Added.
+ [Based on submitted patch from Olivier Duff.]
+
2007-03-30 Jackson Harper <[EMAIL PROTECTED]>
* TextBox.cs: Only select all on initial focus if the user has not
Added:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/HScrollProperties.cs
===================================================================
---
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/HScrollProperties.cs
2007-03-30 15:35:25 UTC (rev 75207)
+++
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/HScrollProperties.cs
2007-03-30 15:37:18 UTC (rev 75208)
@@ -0,0 +1,35 @@
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Authors:
+// Olivier Dufour [EMAIL PROTECTED]
+//
+
+#if NET_2_0
+namespace System.Windows.Forms
+{
+ public class HScrollProperties : ScrollProperties
+ {
+ public HScrollProperties (ScrollableControl container) : base
(container)
+ {
+ scroll_bar = container.hscrollbar;
+ }
+ }
+}
+#endif
\ No newline at end of file
Added:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ScrollProperties.cs
===================================================================
---
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ScrollProperties.cs
2007-03-30 15:35:25 UTC (rev 75207)
+++
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ScrollProperties.cs
2007-03-30 15:37:18 UTC (rev 75208)
@@ -0,0 +1,89 @@
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Authors:
+// Olivier Dufour [EMAIL PROTECTED]
+// Jonathan Pobst [EMAIL PROTECTED]
+//
+
+#if NET_2_0
+using System.ComponentModel;
+
+namespace System.Windows.Forms
+{
+ public abstract class ScrollProperties
+ {
+ #region Private Fields
+ private ScrollableControl parentControl;
+ internal ScrollBar scroll_bar;
+ #endregion
+
+ #region constructor
+ protected ScrollProperties (ScrollableControl container)
+ {
+ parentControl = container;
+ }
+ #endregion
+
+ #region Public Properties
+ public bool Enabled {
+ get { return scroll_bar.Enabled; }
+ set { scroll_bar.Enabled = value; }
+ }
+
+ public int LargeChange {
+ get { return scroll_bar.LargeChange; }
+ set { scroll_bar.LargeChange = value; }
+ }
+
+ public int Maximum {
+ get { return scroll_bar.Maximum; }
+ set { scroll_bar.Maximum = value; }
+ }
+
+ public int Minimum {
+ get { return scroll_bar.Minimum; }
+ set { scroll_bar.Minimum = value; }
+ }
+
+ public int SmallChange {
+ get { return scroll_bar.SmallChange; }
+ set { scroll_bar.SmallChange = value; }
+ }
+
+ [BindableAttribute (true)]
+ public int Value {
+ get { return scroll_bar.Value; }
+ set { scroll_bar.Value = value; }
+ }
+
+ public bool Visible {
+ get { return scroll_bar.Visible; }
+ set { scroll_bar.Visible = value; }
+ }
+ #endregion
+
+ #region Protected Properties
+ protected ScrollableControl ParentControl {
+ get { return parentControl; }
+ }
+ #endregion
+ }
+}
+#endif
\ No newline at end of file
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ScrollableControl.cs
===================================================================
---
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ScrollableControl.cs
2007-03-30 15:35:25 UTC (rev 75207)
+++
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ScrollableControl.cs
2007-03-30 15:37:18 UTC (rev 75208)
@@ -45,11 +45,16 @@
private Point scroll_position;
private DockPaddingEdges dock_padding;
private SizeGrip sizegrip;
- private ImplicitHScrollBar hscrollbar;
- private ImplicitVScrollBar vscrollbar;
+ internal ImplicitHScrollBar hscrollbar;
+ internal ImplicitVScrollBar vscrollbar;
private Size canvas_size;
private Rectangle display_rectangle;
private Control old_parent;
+
+#if NET_2_0
+ private HScrollProperties horizontalScroll;
+ private VScrollProperties verticalScroll;
+#endif
#endregion // Local Variables
[TypeConverter(typeof(ScrollableControl.DockPaddingEdgesConverter))]
@@ -232,6 +237,11 @@
HandleCreated += new EventHandler (AddScrollbars);
CreateScrollbars ();
+
+#if NET_2_0
+ horizontalScroll = new HScrollProperties (this);
+ verticalScroll = new VScrollProperties (this);
+#endif
}
void LocationChangedHandler (object sender, EventArgs e)
@@ -426,6 +436,16 @@
return dock_padding;
}
}
+
+#if NET_2_0
+ public HScrollProperties HorizontalScroll {
+ get { return horizontalScroll; }
+ }
+
+ public VScrollProperties VerticalScroll {
+ get { return verticalScroll; }
+ }
+#endif
#endregion // Public Instance Properties
#region Protected Instance Methods
Added:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/VScrollProperties.cs
===================================================================
---
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/VScrollProperties.cs
2007-03-30 15:35:25 UTC (rev 75207)
+++
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/VScrollProperties.cs
2007-03-30 15:37:18 UTC (rev 75208)
@@ -0,0 +1,35 @@
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Authors:
+// Olivier Dufour [EMAIL PROTECTED]
+//
+
+#if NET_2_0
+namespace System.Windows.Forms
+{
+ public class VScrollProperties : ScrollProperties
+ {
+ public VScrollProperties (ScrollableControl container) : base
(container)
+ {
+ scroll_bar = container.vscrollbar;
+ }
+ }
+}
+#endif
\ No newline at end of file
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.dll.sources
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.dll.sources
2007-03-30 15:35:25 UTC (rev 75207)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms.dll.sources
2007-03-30 15:37:18 UTC (rev 75208)
@@ -338,6 +338,7 @@
System.Windows.Forms/HelpNavigator.cs
System.Windows.Forms/HelpProvider.cs
System.Windows.Forms/HorizontalAlignment.cs
+System.Windows.Forms/HScrollProperties.cs
System.Windows.Forms/HtmlElementInsertionOrientation.cs
System.Windows.Forms/Hwnd.cs
System.Windows.Forms/IButtonControl.cs
@@ -546,6 +547,7 @@
System.Windows.Forms/ScrollEventHandler.cs
System.Windows.Forms/ScrollEventType.cs
System.Windows.Forms/ScrollOrientation.cs
+System.Windows.Forms/ScrollProperties.cs
System.Windows.Forms/ScrollableControl.cs
System.Windows.Forms/SearchDirectionHint.cs
System.Windows.Forms/SearchForVirtualItemEventArgs.cs
@@ -734,6 +736,7 @@
System.Windows.Forms/VScrollBar.cs
System.Windows.Forms/ValidationConstraints.cs
System.Windows.Forms/View.cs
+System.Windows.Forms/VScrollProperties.cs
System.Windows.Forms/WebBrowserDocumentCompletedEventArgs.cs
System.Windows.Forms/WebBrowserDocumentCompletedEventHandler.cs
System.Windows.Forms/WebBrowserEncryptionLevel.cs
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms_test.dll.sources
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms_test.dll.sources
2007-03-30 15:35:25 UTC (rev 75207)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms_test.dll.sources
2007-03-30 15:37:18 UTC (rev 75208)
@@ -56,6 +56,7 @@
System.Windows.Forms/GridTableStylesCollectionTest.cs
System.Windows.Forms/GroupBoxTest.cs
System.Windows.Forms/HelpProviderTest.cs
+System.Windows.Forms/HScrollPropertiesTest.cs
System.Windows.Forms/ImageListTest.cs
System.Windows.Forms/LabelTest.cs
System.Windows.Forms/LinkAreaTest.cs
@@ -131,6 +132,7 @@
System.Windows.Forms/TreeViewTest.cs
System.Windows.Forms/UpDownTest.cs
System.Windows.Forms/UserControlTest.cs
+System.Windows.Forms/VScrollPropertiesTest.cs
System.Windows.Forms.Layout/TableLayoutSettingsTypeConverterTest.cs
System.Resources/CompatTest.cs
System.Resources/CultureTest.cs
Modified:
trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
2007-03-30 15:35:25 UTC (rev 75207)
+++ trunk/mcs/class/Managed.Windows.Forms/Test/System.Windows.Forms/ChangeLog
2007-03-30 15:37:18 UTC (rev 75208)
@@ -1,5 +1,9 @@
2007-03-30 Jonathan Pobst <[EMAIL PROTECTED]>
+ * HScrollPropertiesTest.cs, VScrollPropertiesTest.cs: Added.
+
+2007-03-30 Jonathan Pobst <[EMAIL PROTECTED]>
+
* UserControlTest.cs: Add test for CreateParams.
2007-03-30 Gert Driesen <[EMAIL PROTECTED]>
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches