Language

VisualStyleRenderer.DrawText メソッド

定義

指定した境界内にテキストを描画します。

オーバーロード

名前 説明
DrawText(IDeviceContext, Rectangle, String, Boolean, TextFormatFlags)

無効なテキストを表示し、他のテキスト書式を適用するオプションを使用して、指定した外接する四角形にテキストを描画します。

DrawText(IDeviceContext, Rectangle, String)

既定の書式設定を使用して、指定した境界内にテキストを描画します。

DrawText(IDeviceContext, Rectangle, String, Boolean)

無効なテキストを表示するオプションを使用して、指定した境界内にテキストを描画します。

DrawText(IDeviceContext, Rectangle, String, Boolean, TextFormatFlags)

ソース:
VisualStyleRenderer.cs
ソース:
VisualStyleRenderer.cs
ソース:
VisualStyleRenderer.cs
ソース:
VisualStyleRenderer.cs
ソース:
VisualStyleRenderer.cs

無効なテキストを表示し、他のテキスト書式を適用するオプションを使用して、指定した外接する四角形にテキストを描画します。

public:
 void DrawText(System::Drawing::IDeviceContext ^ dc, System::Drawing::Rectangle bounds, System::String ^ textToDraw, bool drawDisabled, System::Windows::Forms::TextFormatFlags flags);
public void DrawText(System.Drawing.IDeviceContext dc, System.Drawing.Rectangle bounds, string textToDraw, bool drawDisabled, System.Windows.Forms.TextFormatFlags flags);
public void DrawText(System.Drawing.IDeviceContext dc, System.Drawing.Rectangle bounds, string? textToDraw, bool drawDisabled, System.Windows.Forms.TextFormatFlags flags);
member this.DrawText : System.Drawing.IDeviceContext * System.Drawing.Rectangle * string * bool * System.Windows.Forms.TextFormatFlags -> unit
Public Sub DrawText (dc As IDeviceContext, bounds As Rectangle, textToDraw As String, drawDisabled As Boolean, flags As TextFormatFlags)

パラメーター

dc
IDeviceContext

テキストの描画に使用する IDeviceContext 。

bounds
Rectangle

テキストを描画する Rectangle 。

textToDraw
String

描画するテキスト。

drawDisabled
Boolean

true 灰色で表示されたテキストを描画する場合。それ以外の場合は false。

flags
TextFormatFlags

TextFormatFlags値のビットごとの組み合わせ。

例外

dc は nullです。

適用対象

DrawText(IDeviceContext, Rectangle, String)

ソース:
VisualStyleRenderer.cs
ソース:
VisualStyleRenderer.cs
ソース:
VisualStyleRenderer.cs
ソース:
VisualStyleRenderer.cs
ソース:
VisualStyleRenderer.cs

既定の書式設定を使用して、指定した境界内にテキストを描画します。

public:
 void DrawText(System::Drawing::IDeviceContext ^ dc, System::Drawing::Rectangle bounds, System::String ^ textToDraw);
public void DrawText(System.Drawing.IDeviceContext dc, System.Drawing.Rectangle bounds, string textToDraw);
public void DrawText(System.Drawing.IDeviceContext dc, System.Drawing.Rectangle bounds, string? textToDraw);
member this.DrawText : System.Drawing.IDeviceContext * System.Drawing.Rectangle * string -> unit
Public Sub DrawText (dc As IDeviceContext, bounds As Rectangle, textToDraw As String)

パラメーター

dc
IDeviceContext

テキストの描画に使用する IDeviceContext 。

bounds
Rectangle

テキストを描画する Rectangle 。

textToDraw
String

描画するテキスト。

例外

dc は nullです。

適用対象

DrawText(IDeviceContext, Rectangle, String, Boolean)

ソース:
VisualStyleRenderer.cs
ソース:
VisualStyleRenderer.cs
ソース:
VisualStyleRenderer.cs
ソース:
VisualStyleRenderer.cs
ソース:
VisualStyleRenderer.cs

無効なテキストを表示するオプションを使用して、指定した境界内にテキストを描画します。

public:
 void DrawText(System::Drawing::IDeviceContext ^ dc, System::Drawing::Rectangle bounds, System::String ^ textToDraw, bool drawDisabled);
public void DrawText(System.Drawing.IDeviceContext dc, System.Drawing.Rectangle bounds, string textToDraw, bool drawDisabled);
public void DrawText(System.Drawing.IDeviceContext dc, System.Drawing.Rectangle bounds, string? textToDraw, bool drawDisabled);
member this.DrawText : System.Drawing.IDeviceContext * System.Drawing.Rectangle * string * bool -> unit
Public Sub DrawText (dc As IDeviceContext, bounds As Rectangle, textToDraw As String, drawDisabled As Boolean)

パラメーター

dc
IDeviceContext

テキストの描画に使用する IDeviceContext 。

bounds
Rectangle

テキストを描画する Rectangle 。

textToDraw
String

描画するテキスト。

drawDisabled
Boolean

true 灰色で表示されたテキストを描画する場合。それ以外の場合は false。

例外

dc は nullです。

適用対象