VisualStyleRenderer.DrawText Metodo

Definizione

Consente di disegnare testo entro i limiti specificati.

Overload

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

Consente di disegnare testo entro il rettangolo di delimitazione specificato con l'opzione di visualizzazione del testo disabilitato e applicando altra formattazione di testo.

DrawText(IDeviceContext, Rectangle, String)

Consente di disegnare testo entro i limiti specificati utilizzando la formattazione predefinita.

DrawText(IDeviceContext, Rectangle, String, Boolean)

Consente di disegnare testo entro i limiti specificati con l'opzione di visualizzazione del testo disabilitato.

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

Consente di disegnare testo entro il rettangolo di delimitazione specificato con l'opzione di visualizzazione del testo disabilitato e applicando altra formattazione di testo.

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)

Parametri

dc
IDeviceContext

Oggetto IDeviceContext utilizzato per disegnare il testo.

bounds
Rectangle

Struttura Rectangle in cui disegnare il testo.

textToDraw
String

Testo da disegnare.

drawDisabled
Boolean

true per disegnare testo inattivo; in caso contrario, false.

flags
TextFormatFlags

Combinazione bit per bit dei valori di TextFormatFlags.

Eccezioni

dc è null.

Si applica a

DrawText(IDeviceContext, Rectangle, String)

Consente di disegnare testo entro i limiti specificati utilizzando la formattazione predefinita.

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)

Parametri

dc
IDeviceContext

Oggetto IDeviceContext utilizzato per disegnare il testo.

bounds
Rectangle

Struttura Rectangle in cui disegnare il testo.

textToDraw
String

Testo da disegnare.

Eccezioni

dc è null.

Si applica a

DrawText(IDeviceContext, Rectangle, String, Boolean)

Consente di disegnare testo entro i limiti specificati con l'opzione di visualizzazione del testo disabilitato.

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)

Parametri

dc
IDeviceContext

Oggetto IDeviceContext utilizzato per disegnare il testo.

bounds
Rectangle

Struttura Rectangle in cui disegnare il testo.

textToDraw
String

Testo da disegnare.

drawDisabled
Boolean

true per disegnare testo inattivo; in caso contrario, false.

Eccezioni

dc è null.

Si applica a