使用可用的R、G和B值,如何设置UltraLabel的ForeColor属性?我尝试过以下几种方法:
UltraLabel lbl = new UltraLabel();
lbl.Text = "Some text";
lbl.Appearance.ForeColor.R = 255; // ERROR: Property or indexer 'System.Drawing.Color.R' cannot be assigned to -- it is read only
lbl.Appearance.ForeColor.G = 255; // ERROR: Property or indexer 'System.Drawing.Color.G' cannot be assigned to -- it is read only
lbl.Appearance.ForeColor.B = 255; // ERROR: Property or indexer 'System.Drawing.Color.B' cannot be assigned to -- it is read only还有没有其他的方法呢?
发布于 2013-02-05 15:38:18
也许可以试试:
lbl.Appearance.ForeColor = Color.FromArgb(r, g, b);发布于 2013-02-05 15:36:49
lbl.Appearance.ForeColor = new Color(255, 255, 255);https://stackoverflow.com/questions/14702246
复制相似问题