C1PrintDocument には、指定された文字列を新しい段落を開始せずにブロックフローにレンダリングする RenderInLineText メソッドがあります。RenderInLineText メソッドはテキストを自動的にラップします。このトピックでは、RenderInLineText メソッドの使用方法を示します。
Visual Basic コードの書き方
| Visual Basic |
コードのコピー
|
|---|---|
Me.C1PrintDocument1.StartDoc()
Me.C1PrintDocument1.RenderInlineText("With C1PrintDocument you can print ")
|
|
C# コードの書き方
| C# |
コードのコピー
|
|---|---|
this.c1PrintDocument1.StartDoc();
this.c1PrintDocument1.RenderInlineText("With C1PrintDocument you can print ");
|
|
Visual Basic コードの書き方
| Visual Basic |
コードのコピー
|
|---|---|
Me.C1PrintDocument1.RenderInlineText("Line by Line", New Font("Times New Roman", 30, FontStyle.Bold), Color.FromArgb(0, 0, 125))
Me.C1PrintDocument1.RenderInlineText(" and modify text attributes as you go.")
|
|
C# コードの書き方
| C# |
コードのコピー
|
|---|---|
this.c1PrintDocument1.RenderInlineText("Line by Line", new Font("Times New Roman", 30, FontStyle.Bold), Color.FromArgb(0, 0, 125));
this.c1PrintDocument1.RenderInlineText(" and modify text attributes as you go.");
|
|
Visual Basic コードの書き方
| Visual Basic |
コードのコピー
|
|---|---|
Me.C1PrintDocument1.RenderInlineText(" The text wraps automatically, so your life becomes easier.", Color.Green)
|
|
C# コードの書き方
| C# |
コードのコピー
|
|---|---|
this.c1PrintDocument1.RenderInlineText(" The text wraps automatically, so your life becomes easier.", Color.Green);
|
|
Visual Basic コードの書き方
| Visual Basic |
コードのコピー
|
|---|---|
Me.C1PrintDocument1.EndDoc() |
|
C# コードの書き方
| C# |
コードのコピー
|
|---|---|
this.c1PrintDocument1.EndDoc(); |
|
テーブルは次のように表示されます。
