【发布时间】:2017-01-18 04:12:33
【问题描述】:
我的代码是:
grdListofItems.Rows[intRow].Cells[columnName].Style.ForeColor = Color.Green;
它在 Windows 经典模式 下运行良好,DropDownList 字体为绿色。
但是当它在Windows 7 中运行时,字体颜色又变回了黑色。
【问题讨论】:
我的代码是:
grdListofItems.Rows[intRow].Cells[columnName].Style.ForeColor = Color.Green;
它在 Windows 经典模式 下运行良好,DropDownList 字体为绿色。
但是当它在Windows 7 中运行时,字体颜色又变回了黑色。
【问题讨论】:
尝试启用Application.EnableVisualStyles();。
顺便说一句,您的意思是ComboBox 或DataGridView?
编辑:此链接导致答案。 Change the back color of the cell for DataGridViewComboBoxColumn
【讨论】: