VisualStyleRenderer.DrawText Metoda

Definice

Nakreslí text v zadaných hranicích.

Přetížení

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

Nakreslí text do zadaného ohraničujícího obdélníku s možností zobrazení zakázaného textu a použitím jiného formátování textu.

DrawText(IDeviceContext, Rectangle, String)

Nakreslí text v zadaných hranicích pomocí výchozího formátování.

DrawText(IDeviceContext, Rectangle, String, Boolean)

Nakreslí text v zadaných hranicích s možností zobrazení zakázaného textu.

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

Nakreslí text do zadaného ohraničujícího obdélníku s možností zobrazení zakázaného textu a použitím jiného formátování textu.

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)

Parametry

dc
IDeviceContext

Používá IDeviceContext se k vykreslení textu.

bounds
Rectangle

A Rectangle , do kterého chcete nakreslit text.

textToDraw
String

Text, který chcete nakreslit.

drawDisabled
Boolean

true kreslit šedě v textu; falsev opačném případě .

flags
TextFormatFlags

Bitové kombinace TextFormatFlags hodnot.

Výjimky

dc je null.

Platí pro

DrawText(IDeviceContext, Rectangle, String)

Nakreslí text v zadaných hranicích pomocí výchozího formátování.

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)

Parametry

dc
IDeviceContext

Používá IDeviceContext se k kreslení textu.

bounds
Rectangle

A Rectangle , ve kterém chcete nakreslit text.

textToDraw
String

Text, který chcete nakreslit.

Výjimky

dc je null.

Platí pro

DrawText(IDeviceContext, Rectangle, String, Boolean)

Nakreslí text v zadaných hranicích s možností zobrazení zakázaného textu.

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)

Parametry

dc
IDeviceContext

Používá IDeviceContext se k vykreslení textu.

bounds
Rectangle

A Rectangle , do kterého chcete nakreslit text.

textToDraw
String

Text, který chcete nakreslit.

drawDisabled
Boolean

true kreslit šedě v textu; falsev opačném případě .

Výjimky

dc je null.

Platí pro