Reports for WinForms
テキストの色を設定する

RenderText.Style.TextColorプロパティを設定します。

実行例


サンプルコード(VB)
コードのコピー
' 色の名前でテキストの色を設定します。
texts(0).Text = "赤"
texts(0).Style.TextColor = Color.Red

' RGB形式でテキストの色を設定します。
texts(1).Text = "#802080"
texts(1).Style.TextColor = Color.FromArgb(&H80, &H20, &H80)
                             
サンプルコード(C#)
コードのコピー
 // 色の名前でテキストの色を設定します。
texts[0].Text = "赤";
texts[0].Style.TextColor = Color.Red;

// RGB形式でテキストの色を設定します。
texts[1].Text = "#802080";
texts[1].Style.TextColor = Color.FromArgb(0x80, 0x20, 0x80);