Author: rolf
Date: 2007-04-26 04:59:00 -0400 (Thu, 26 Apr 2007)
New Revision: 76300
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MaskedTextBox.cs
Log:
* Control.cs: set_Text: move the call to the driver into a seperate
virtual method so that Form can override it.
* MaskedTextBox.cs: Corcompare fixes.
* Form.cs: Override UpdateWindowText and only update the styles if the
form has been shown (fixes #81405).
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-04-26 06:54:37 UTC (rev 76299)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
2007-04-26 08:59:00 UTC (rev 76300)
@@ -1,3 +1,11 @@
+2007-04-26 Rolf Bjarne Kvinge <[EMAIL PROTECTED]>
+
+ * Control.cs: set_Text: move the call to the driver into a seperate
+ virtual method so that Form can override it.
+ * MaskedTextBox.cs: Corcompare fixes.
+ * Form.cs: Override UpdateWindowText and only update the styles if the
+ form has been shown (fixes #81405).
+
2007-04-25 Jonathan Pobst <[EMAIL PROTECTED]>
* Control.cs, Form.cs: Use the better supported WM_?BUTTONDOWN and
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
2007-04-26 06:54:37 UTC (rev 76299)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Control.cs
2007-04-26 08:59:00 UTC (rev 76300)
@@ -3037,17 +3037,19 @@
if (text!=value) {
text=value;
- if (IsHandleCreated) {
- /* we need to call
.SetWindowStyle here instead of just .Text
- because the presence/absence
of Text (== "" or not) can cause
- other window style things to
appear/disappear */
-
XplatUI.SetWindowStyle(window.Handle, CreateParams);
- XplatUI.Text(Handle, text);
- }
+ UpdateWindowText ();
OnTextChanged (EventArgs.Empty);
}
}
}
+
+ internal virtual void UpdateWindowText ()
+ {
+ if (!IsHandleCreated) {
+ return;
+ }
+ XplatUI.Text (Handle, text);
+ }
[EditorBrowsable(EditorBrowsableState.Always)]
[Browsable(false)]
Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs
2007-04-26 06:54:37 UTC (rev 76299)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs
2007-04-26 08:59:00 UTC (rev 76300)
@@ -149,6 +149,21 @@
{
OnActivated (EventArgs.Empty);
}
+
+ internal override void UpdateWindowText ()
+ {
+ if (!IsHandleCreated) {
+ return;
+ }
+
+ if (shown_raised) {
+ /* we need to call .SetWindowStyle here instead
of just .Text
+ because the presence/absence of Text (== ""
or not) can cause
+ other window style things to
appear/disappear */
+ XplatUI.SetWindowStyle (window.Handle,
CreateParams);
+ }
+ base.UpdateWindowText ();
+ }
private void SelectActiveControl ()
{
Modified:
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MaskedTextBox.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MaskedTextBox.cs
2007-04-26 06:54:37 UTC (rev 76299)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/MaskedTextBox.cs
2007-04-26 08:59:00 UTC (rev 76300)
@@ -478,6 +478,9 @@
get {
return base.MaxLength;
}
+ set {
+ // Do nothing, MTB doesn't support this.
+ }
}
[EditorBrowsable (EditorBrowsableState.Never)]
@@ -487,6 +490,9 @@
get {
return false;
}
+ set {
+ // Do nothing, MTB doesn't support this.
+ }
}
[RefreshProperties (RefreshProperties.Repaint)]
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches