【问题标题】:Changing WinForm Button Text Color?更改 WinForm 按钮文本颜色?
【发布时间】:2011-03-14 20:50:27
【问题描述】:

我想知道是否可以更改 WinForm 按钮文本的颜色。我正在查看字体属性,但找不到任何东西,但我觉得这应该是可能的简单和(在我看来)实用的东西......

【问题讨论】:

    标签: c# winforms button


    【解决方案1】:

    您需要按钮的ForeColor 属性,继承自Control。见this link

    【讨论】:

      【解决方案2】:

      使用ForeColor 属性。

      【讨论】:

        【解决方案3】:

        看看按钮ForeColor属性

        【讨论】:

          【解决方案4】:
          Button btn = new Button();
          //in this situation text color it will be black, for white 255,255,255
          btn.Forecolor = System.Drawing.Color.FromArgb(0,0,0);
          

          【讨论】:

          • 感谢提醒,这是我的第一条评论。这样可以吗?
          猜你喜欢
          • 1970-01-01
          • 2017-04-10
          • 1970-01-01
          • 1970-01-01
          • 2021-05-23
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多