VisualStyleRenderer.DrawText Metoda

Definicja

Rysuje tekst w określonych granicach.

Przeciążenia

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

Rysuje tekst w określonym prostokątze ograniczenia z opcją wyświetlania wyłączonego tekstu i stosowania innego formatowania tekstu.

DrawText(IDeviceContext, Rectangle, String)

Rysuje tekst w określonych granicach przy użyciu formatowania domyślnego.

DrawText(IDeviceContext, Rectangle, String, Boolean)

Rysuje tekst w określonych granicach z opcją wyświetlania wyłączonego tekstu.

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

Rysuje tekst w określonym prostokątze ograniczenia z opcją wyświetlania wyłączonego tekstu i stosowania innego formatowania tekstu.

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

Element IDeviceContext używany do rysowania tekstu.

bounds
Rectangle

Element Rectangle , w którym ma być rysowanie tekstu.

textToDraw
String

Tekst do rysowania.

drawDisabled
Boolean

true rysowanie tekstu wyszaranego; w przeciwnym razie , false.

flags
TextFormatFlags

Bitowa kombinacja TextFormatFlags wartości.

Wyjątki

dc to null.

Dotyczy

DrawText(IDeviceContext, Rectangle, String)

Rysuje tekst w określonych granicach przy użyciu formatowania domyślnego.

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

Element IDeviceContext używany do rysowania tekstu.

bounds
Rectangle

Element Rectangle , w którym ma być rysowanie tekstu.

textToDraw
String

Tekst do rysowania.

Wyjątki

dc to null.

Dotyczy

DrawText(IDeviceContext, Rectangle, String, Boolean)

Rysuje tekst w określonych granicach z opcją wyświetlania wyłączonego tekstu.

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

Element IDeviceContext używany do rysowania tekstu.

bounds
Rectangle

Element Rectangle , w którym ma być rysowanie tekstu.

textToDraw
String

Tekst do rysowania.

drawDisabled
Boolean

true rysowanie tekstu wyszaranego; w przeciwnym razie , false.

Wyjątki

dc to null.

Dotyczy