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:
authorАлександр Хухлаев <sancheolz@gmail.com>2020-04-08 20:40:21 +0300
committerGitHub <noreply@github.com>2020-04-08 20:40:21 +0300
commit198e323fc2d4e1d07fcbd4ae35c476ec7ce004e8 (patch)
treed1dc25c9ebf8f7558e090035faebcbc3c72f16dd
parent4f7cc4db7ea6ed292b02b8b3b490ab5f5f745681 (diff)
[WinForms] Fix ToolStripTextBox Width (#19457)
When set non-Empty Size to ToolStripTextBox it will appear with zero with, but must use width from size.
-rw-r--r--mcs/class/System.Windows.Forms/System.Windows.Forms/ToolStripTextBox.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/ToolStripTextBox.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/ToolStripTextBox.cs
index 43b53c45a2a..91bbb2f3bdc 100644
--- a/mcs/class/System.Windows.Forms/System.Windows.Forms/ToolStripTextBox.cs
+++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/ToolStripTextBox.cs
@@ -311,7 +311,7 @@ namespace System.Windows.Forms
public override Size GetPreferredSize (Size constrainingSize)
{
- return base.GetPreferredSize (constrainingSize);
+ return new Size(TextBox.Bounds.Width, TextBox.PreferredHeight);
}
public void Paste ()