【问题标题】:"TextBox.BorderStyle = BorderStyle.None" makes bottom of text invisible"TextBox.BorderStyle = BorderStyle.None" 使文本底部不可见
【发布时间】:2017-04-12 17:38:47
【问题描述】:

每当我将文本框的边框样式设置为“无”时,框内文本的底部都是不可见的。这意味着我看不到像 y 和 j 这样的字母的下划线和降序。

Here is the textbox with border

Here is the textbox without border

任何有关如何解决此问题的建议将不胜感激。

【问题讨论】:

标签: c# winforms


【解决方案1】:

这似乎对我有用:

public Form1()
{
    InitializeComponent();
    textBox1.Multiline = true;
    textBox1.MinimumSize = new Size(0, 30);
    textBox1.Size = new Size(textBox1.Size.Width, 30);
    textBox1.Multiline = false;
}

将框设置为多行以调整框的大小,然后在其变回时保持大小。

【讨论】:

    猜你喜欢
    • 2023-03-04
    • 1970-01-01
    • 2023-03-24
    • 2011-02-07
    • 2019-02-20
    • 2019-07-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多