Share via


VisualStyleRenderer.DrawText 메서드

정의

지정된 범위 내에 텍스트를 그립니다.

오버로드

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

비활성화된 텍스트를 표시하는 옵션과 다른 텍스트 서식을 적용하는 옵션을 사용하여 지정된 경계 사각형 내에 텍스트를 그립니다.

DrawText(IDeviceContext, Rectangle, String)

기본 서식을 사용하여 지정된 범위 내에 텍스트를 그립니다.

DrawText(IDeviceContext, Rectangle, String, Boolean)

비활성화된 텍스트를 표시하는 옵션을 사용하여 지정된 범위 내에 텍스트를 그립니다.

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

비활성화된 텍스트를 표시하는 옵션과 다른 텍스트 서식을 적용하는 옵션을 사용하여 지정된 경계 사각형 내에 텍스트를 그립니다.

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)

매개 변수

dc
IDeviceContext

텍스트를 그릴 때 사용되는 IDeviceContext입니다.

bounds
Rectangle

텍스트를 그릴 Rectangle입니다.

textToDraw
String

그릴 텍스트입니다.

drawDisabled
Boolean

회색으로 표시되는 텍스트를 그리려면 true이고, 그렇지 않으면 false입니다.

flags
TextFormatFlags

TextFormatFlags 값의 비트 조합입니다.

예외

dc이(가) null인 경우

적용 대상

DrawText(IDeviceContext, Rectangle, String)

기본 서식을 사용하여 지정된 범위 내에 텍스트를 그립니다.

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)

매개 변수

dc
IDeviceContext

텍스트를 그릴 때 사용되는 IDeviceContext입니다.

bounds
Rectangle

텍스트를 그릴 Rectangle입니다.

textToDraw
String

그릴 텍스트입니다.

예외

dc이(가) null인 경우

적용 대상

DrawText(IDeviceContext, Rectangle, String, Boolean)

비활성화된 텍스트를 표시하는 옵션을 사용하여 지정된 범위 내에 텍스트를 그립니다.

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)

매개 변수

dc
IDeviceContext

텍스트를 그릴 때 사용되는 IDeviceContext입니다.

bounds
Rectangle

텍스트를 그릴 Rectangle입니다.

textToDraw
String

그릴 텍스트입니다.

drawDisabled
Boolean

회색으로 표시되는 텍스트를 그리려면 true이고, 그렇지 않으면 false입니다.

예외

dc이(가) null인 경우

적용 대상