我正在使用MDI Forms
. 在我的父表单中,我有一个ToolStrip
按钮。昨天我不得不将文本从黑色(我认为这是默认颜色,因为我之前没有更改过)更改为灰色。我可以看到设计器中的文本变为灰色,在MainForm.Designer.Cs
代码中是:
this.btnClients.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
this.btnClients.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold);
this.btnClients.ForeColor = System.Drawing.SystemColors.ActiveBorder;
this.btnClients.Image = global::ShoesUnlimitedAdmin.Properties.Resources.Clients;
this.btnClients.ImageScaling = System.Windows.Forms.ToolStripItemImageScaling.None;
this.btnClients.ImageTransparentColor = System.Drawing.Color.Magenta;
this.btnClients.Name = "btnClients";
this.btnClients.Size = new System.Drawing.Size(93, 49);
this.btnClients.Text = "Clients";
this.btnClients.Click += new System.EventHandler(this.btnClients_Click);
更确切地说:
this.btnClients.ForeColor = System.Drawing.SystemColors.ActiveBorder;
这是一种灰色(我也尝试过使用自定义颜色,但也没有用)。但是当我启动应用程序时,文本颜色仍然像以前一样保持黑色。