Share via


VisualStyleRenderer.DrawText Método

Definição

Desenha texto nos limites especificados.

Sobrecargas

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

Desenha texto no retângulo delimitador especificado com a opção de exibir texto desabilitado e aplicar outra formatação de texto.

DrawText(IDeviceContext, Rectangle, String)

Desenha texto nos limites especificados usando a formatação padrão.

DrawText(IDeviceContext, Rectangle, String, Boolean)

Desenha texto nos limites especificados com a opção de exibir texto desabilitado.

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

Desenha texto no retângulo delimitador especificado com a opção de exibir texto desabilitado e aplicar outra formatação de texto.

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)

Parâmetros

dc
IDeviceContext

O IDeviceContext usado para desenhar o texto.

bounds
Rectangle

Um Rectangle no qual desenhar o texto.

textToDraw
String

O texto a ser desenhado.

drawDisabled
Boolean

true para desenhar texto acinzentado; caso contrário, false.

flags
TextFormatFlags

Uma combinação bit a bit dos valores TextFormatFlags.

Exceções

dc é null.

Aplica-se a

DrawText(IDeviceContext, Rectangle, String)

Desenha texto nos limites especificados usando a formatação padrão.

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)

Parâmetros

dc
IDeviceContext

O IDeviceContext usado para desenhar o texto.

bounds
Rectangle

Um Rectangle no qual desenhar o texto.

textToDraw
String

O texto a ser desenhado.

Exceções

dc é null.

Aplica-se a

DrawText(IDeviceContext, Rectangle, String, Boolean)

Desenha texto nos limites especificados com a opção de exibir texto desabilitado.

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)

Parâmetros

dc
IDeviceContext

O IDeviceContext usado para desenhar o texto.

bounds
Rectangle

Um Rectangle no qual desenhar o texto.

textToDraw
String

O texto a ser desenhado.

drawDisabled
Boolean

true para desenhar texto acinzentado; caso contrário, false.

Exceções

dc é null.

Aplica-se a