Partager via


VisualStyleRenderer.DrawText Méthode

Définition

Dessine le texte dans les limites spécifiées.

Surcharges

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

Dessine le texte dans le rectangle englobant spécifié avec l'option d'affichage du texte désactivé et d'application d'une autre mise en forme de texte.

DrawText(IDeviceContext, Rectangle, String)

Dessine le texte dans les limites spécifiées à l'aide de la mise en forme par défaut.

DrawText(IDeviceContext, Rectangle, String, Boolean)

Dessine le texte dans les limites spécifiées avec l'option d'affichage du texte désactivé.

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

Dessine le texte dans le rectangle englobant spécifié avec l'option d'affichage du texte désactivé et d'application d'une autre mise en forme de texte.

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)

Paramètres

dc
IDeviceContext

IDeviceContext utilisé pour le dessiner le texte.

bounds
Rectangle

Rectangle dans lequel dessiner le texte.

textToDraw
String

Texte à dessiner.

drawDisabled
Boolean

true pour dessiner le texte grisé ; sinon, false.

flags
TextFormatFlags

Combinaison d'opérations de bits des valeurs TextFormatFlags.

Exceptions

dc a la valeur null.

S’applique à

DrawText(IDeviceContext, Rectangle, String)

Dessine le texte dans les limites spécifiées à l'aide de la mise en forme par défaut.

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)

Paramètres

dc
IDeviceContext

IDeviceContext utilisé pour le dessiner le texte.

bounds
Rectangle

Rectangle dans lequel dessiner le texte.

textToDraw
String

Texte à dessiner.

Exceptions

dc a la valeur null.

S’applique à

DrawText(IDeviceContext, Rectangle, String, Boolean)

Dessine le texte dans les limites spécifiées avec l'option d'affichage du texte désactivé.

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)

Paramètres

dc
IDeviceContext

IDeviceContext utilisé pour le dessiner le texte.

bounds
Rectangle

Rectangle dans lequel dessiner le texte.

textToDraw
String

Texte à dessiner.

drawDisabled
Boolean

true pour dessiner le texte grisé ; sinon, false.

Exceptions

dc a la valeur null.

S’applique à