我希望根据与父对象一起传递的Label Color参数来更改Crystal Report上框对象的颜色。
public class PartType
{
public string partTypeID { get; set; }
public string name { get; set; }
public int label_R { get; set; }
public int label_G { get; set; }
public int label_B { get; set; }
public int text_R { get; set; }
public int text_G { get; set; }
public int text_B { get; set; }
public Color GetLabelColor()
{
Color color = new Color();
color = Color.FromArgb(label_R, label_G, label_B);
return color;
}
public Color GetTextColor()
{
Color color = new Color();
color = Color.FromArgb(text_R, text_G, text_B);
return color;
}
}
我不确定如何访问box对象的填充色,因为据我所知,以下代码是如何通过我的初始C#代码实际访问box的。
rptMRPLabel.Section3.ReportObjects["boxTitle"]
我经过一番混乱才弄清楚了。
BoxObject i = rptMRPLabel.Section3.ReportObjects["boxTitle"] as BoxObject;
i.FillColor = color;
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句