使用可用的 R、G 和 B 值,我如何设置ForeColor
an 的属性UltraLabel
?我尝试了以下方法:
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
还有其他方法可以做到这一点吗?