TabRenderer.DrawTabItem 메서드

정의

tab 컨트롤에서 페이지를 선택하는 데 사용되는 탭을 그립니다.

오버로드

DrawTabItem(Graphics, Rectangle, TabItemState)

지정된 상태와 범위를 사용하여 탭을 그립니다.

DrawTabItem(Graphics, Rectangle, Boolean, TabItemState)

지정된 상태, 범위 및 포커스 영역(선택 사항)을 사용하여 탭을 그립니다.

DrawTabItem(Graphics, Rectangle, String, Font, TabItemState)

지정된 상태, 범위 및 텍스트를 사용하여 탭을 그립니다.

DrawTabItem(Graphics, Rectangle, Image, Rectangle, Boolean, TabItemState)

지정된 상태, 범위, 이미지 및 포커스 영역(선택 사항)을 사용하여 탭을 그립니다.

DrawTabItem(Graphics, Rectangle, String, Font, Boolean, TabItemState)

지정된 상태, 범위, 텍스트 및 포커스 영역(선택 사항)을 사용하여 탭을 그립니다.

DrawTabItem(Graphics, Rectangle, String, Font, TextFormatFlags, Boolean, TabItemState)

지정된 상태, 범위, 텍스트, 텍스트 서식 및 포커스 영역(선택 사항)을 사용하여 탭을 그립니다.

DrawTabItem(Graphics, Rectangle, String, Font, Image, Rectangle, Boolean, TabItemState)

지정된 상태, 범위, 텍스트, 이미지 및 포커스 영역(선택 사항)을 사용하여 탭을 그립니다.

DrawTabItem(Graphics, Rectangle, String, Font, TextFormatFlags, Image, Rectangle, Boolean, TabItemState)

지정된 상태, 범위, 텍스트, 텍스트 서식, 이미지 및 포커스 영역(선택 사항)을 사용하여 탭을 그립니다.

DrawTabItem(Graphics, Rectangle, TabItemState)

지정된 상태와 범위를 사용하여 탭을 그립니다.

public:
 static void DrawTabItem(System::Drawing::Graphics ^ g, System::Drawing::Rectangle bounds, System::Windows::Forms::VisualStyles::TabItemState state);
public static void DrawTabItem (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, System.Windows.Forms.VisualStyles.TabItemState state);
static member DrawTabItem : System.Drawing.Graphics * System.Drawing.Rectangle * System.Windows.Forms.VisualStyles.TabItemState -> unit
Public Shared Sub DrawTabItem (g As Graphics, bounds As Rectangle, state As TabItemState)

매개 변수

g
Graphics

탭을 그릴 때 사용되는 Graphics입니다.

bounds
Rectangle

탭의 범위를 지정하는 Rectangle입니다.

state
TabItemState

탭의 표시 상태를 지정하는 TabItemState 값 중 하나입니다.

예외

운영 체제에서 비주얼 스타일을 지원하지 않는 경우

또는

운영 체제에서 사용자가 비주얼 스타일을 사용하지 않도록 설정한 경우

또는

비주얼 스타일이 애플리케이션 창의 클라이언트 영역에 적용되지 않은 경우

설명

이 메서드를 호출 하기 전에 있는지 확인 해야 합니다 IsSupported 속성이 반환 true합니다.

적용 대상

DrawTabItem(Graphics, Rectangle, Boolean, TabItemState)

지정된 상태, 범위 및 포커스 영역(선택 사항)을 사용하여 탭을 그립니다.

public:
 static void DrawTabItem(System::Drawing::Graphics ^ g, System::Drawing::Rectangle bounds, bool focused, System::Windows::Forms::VisualStyles::TabItemState state);
public static void DrawTabItem (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, bool focused, System.Windows.Forms.VisualStyles.TabItemState state);
static member DrawTabItem : System.Drawing.Graphics * System.Drawing.Rectangle * bool * System.Windows.Forms.VisualStyles.TabItemState -> unit
Public Shared Sub DrawTabItem (g As Graphics, bounds As Rectangle, focused As Boolean, state As TabItemState)

매개 변수

g
Graphics

탭을 그릴 때 사용되는 Graphics입니다.

bounds
Rectangle

탭의 범위를 지정하는 Rectangle입니다.

focused
Boolean

포커스 영역을 그리려면 true로 설정하고, 그렇지 않으면 false로 설정합니다.

state
TabItemState

탭의 표시 상태를 지정하는 TabItemState 값 중 하나입니다.

예외

운영 체제에서 비주얼 스타일을 지원하지 않는 경우

또는

운영 체제에서 사용자가 비주얼 스타일을 사용하지 않도록 설정한 경우

또는

비주얼 스타일이 애플리케이션 창의 클라이언트 영역에 적용되지 않은 경우

설명

이 메서드를 호출 하기 전에 있는지 확인 해야 합니다 IsSupported 속성이 반환 true합니다.

적용 대상

DrawTabItem(Graphics, Rectangle, String, Font, TabItemState)

지정된 상태, 범위 및 텍스트를 사용하여 탭을 그립니다.

public:
 static void DrawTabItem(System::Drawing::Graphics ^ g, System::Drawing::Rectangle bounds, System::String ^ tabItemText, System::Drawing::Font ^ font, System::Windows::Forms::VisualStyles::TabItemState state);
public static void DrawTabItem (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string tabItemText, System.Drawing.Font font, System.Windows.Forms.VisualStyles.TabItemState state);
public static void DrawTabItem (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string? tabItemText, System.Drawing.Font? font, System.Windows.Forms.VisualStyles.TabItemState state);
static member DrawTabItem : System.Drawing.Graphics * System.Drawing.Rectangle * string * System.Drawing.Font * System.Windows.Forms.VisualStyles.TabItemState -> unit
Public Shared Sub DrawTabItem (g As Graphics, bounds As Rectangle, tabItemText As String, font As Font, state As TabItemState)

매개 변수

g
Graphics

탭을 그릴 때 사용되는 Graphics입니다.

bounds
Rectangle

탭의 범위를 지정하는 Rectangle입니다.

tabItemText
String

탭에 그릴 String입니다.

font
Font

tabItemText에 적용할 Font입니다.

state
TabItemState

탭의 표시 상태를 지정하는 TabItemState 값 중 하나입니다.

예외

운영 체제에서 비주얼 스타일을 지원하지 않는 경우

또는

운영 체제에서 사용자가 비주얼 스타일을 사용하지 않도록 설정한 경우

또는

비주얼 스타일이 애플리케이션 창의 클라이언트 영역에 적용되지 않은 경우

설명

이 메서드를 호출 하기 전에 있는지 확인 해야 합니다 IsSupported 속성이 반환 true합니다.

적용 대상

DrawTabItem(Graphics, Rectangle, Image, Rectangle, Boolean, TabItemState)

지정된 상태, 범위, 이미지 및 포커스 영역(선택 사항)을 사용하여 탭을 그립니다.

public:
 static void DrawTabItem(System::Drawing::Graphics ^ g, System::Drawing::Rectangle bounds, System::Drawing::Image ^ image, System::Drawing::Rectangle imageRectangle, bool focused, System::Windows::Forms::VisualStyles::TabItemState state);
public static void DrawTabItem (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, System.Drawing.Image image, System.Drawing.Rectangle imageRectangle, bool focused, System.Windows.Forms.VisualStyles.TabItemState state);
static member DrawTabItem : System.Drawing.Graphics * System.Drawing.Rectangle * System.Drawing.Image * System.Drawing.Rectangle * bool * System.Windows.Forms.VisualStyles.TabItemState -> unit
Public Shared Sub DrawTabItem (g As Graphics, bounds As Rectangle, image As Image, imageRectangle As Rectangle, focused As Boolean, state As TabItemState)

매개 변수

g
Graphics

탭을 그릴 때 사용되는 Graphics입니다.

bounds
Rectangle

탭의 범위를 지정하는 Rectangle입니다.

image
Image

탭에 그릴 Image입니다.

imageRectangle
Rectangle

image의 범위를 지정하는 Rectangle입니다.

focused
Boolean

포커스 영역을 그리려면 true로 설정하고, 그렇지 않으면 false로 설정합니다.

state
TabItemState

탭의 표시 상태를 지정하는 TabItemState 값 중 하나입니다.

예외

운영 체제에서 비주얼 스타일을 지원하지 않는 경우

또는

운영 체제에서 사용자가 비주얼 스타일을 사용하지 않도록 설정한 경우

또는

비주얼 스타일이 애플리케이션 창의 클라이언트 영역에 적용되지 않은 경우

설명

이 메서드를 호출 하기 전에 있는지 확인 해야 합니다 IsSupported 속성이 반환 true합니다.

적용 대상

DrawTabItem(Graphics, Rectangle, String, Font, Boolean, TabItemState)

지정된 상태, 범위, 텍스트 및 포커스 영역(선택 사항)을 사용하여 탭을 그립니다.

public:
 static void DrawTabItem(System::Drawing::Graphics ^ g, System::Drawing::Rectangle bounds, System::String ^ tabItemText, System::Drawing::Font ^ font, bool focused, System::Windows::Forms::VisualStyles::TabItemState state);
public static void DrawTabItem (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string tabItemText, System.Drawing.Font font, bool focused, System.Windows.Forms.VisualStyles.TabItemState state);
public static void DrawTabItem (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string? tabItemText, System.Drawing.Font? font, bool focused, System.Windows.Forms.VisualStyles.TabItemState state);
static member DrawTabItem : System.Drawing.Graphics * System.Drawing.Rectangle * string * System.Drawing.Font * bool * System.Windows.Forms.VisualStyles.TabItemState -> unit
Public Shared Sub DrawTabItem (g As Graphics, bounds As Rectangle, tabItemText As String, font As Font, focused As Boolean, state As TabItemState)

매개 변수

g
Graphics

탭을 그릴 때 사용되는 Graphics입니다.

bounds
Rectangle

탭의 범위를 지정하는 Rectangle입니다.

tabItemText
String

탭에 그릴 String입니다.

font
Font

tabItemText에 적용할 Font입니다.

focused
Boolean

포커스 영역을 그리려면 true로 설정하고, 그렇지 않으면 false로 설정합니다.

state
TabItemState

탭의 표시 상태를 지정하는 TabItemState 값 중 하나입니다.

예외

운영 체제에서 비주얼 스타일을 지원하지 않는 경우

또는

운영 체제에서 사용자가 비주얼 스타일을 사용하지 않도록 설정한 경우

또는

비주얼 스타일이 애플리케이션 창의 클라이언트 영역에 적용되지 않은 경우

예제

다음 코드 예제에서는 합니다 DrawTabItem(Graphics, Rectangle, String, Font, Boolean, TabItemState) 메서드는 사용자 지정 컨트롤의 OnPaint 탭 항목을 그리는 방법입니다. 이 코드 예제는에 대해 제공 된 큰 예제의 일부는 TabRenderer 클래스입니다.

    // Draw the tab page and the tab items.
protected:
    virtual void OnPaint(PaintEventArgs^ e) override
    {
        __super::OnPaint(e);

        if (!TabRenderer::IsSupported)
        {
            this->Parent->Text = "CustomTabControl Disabled";
            return;
        }

        TabRenderer::DrawTabPage(e->Graphics, tabPageRectangle);
        TabRenderer::DrawTabItem(e->Graphics, tabItemRectangle1,
            tab1Text, this->Font, tab1Focused, tab1State);
        TabRenderer::DrawTabItem(e->Graphics, tabItemRectangle2,
            tab2Text, this->Font, tab2Focused, tab2State);

        this->Parent->Text = "CustomTabControl Enabled";
    }
// Draw the tab page and the tab items.
protected override void OnPaint(PaintEventArgs e)
{
    base.OnPaint(e);

    if (!TabRenderer.IsSupported)
    {
        this.Parent.Text = "CustomTabControl Disabled";
        return;
    }

    TabRenderer.DrawTabPage(e.Graphics, tabPageRectangle);
    TabRenderer.DrawTabItem(e.Graphics, tabItemRectangle1,
        tab1Text, this.Font, tab1Focused, tab1State);
    TabRenderer.DrawTabItem(e.Graphics, tabItemRectangle2,
        tab2Text, this.Font, tab2Focused, tab2State);

    this.Parent.Text = "CustomTabControl Enabled";
}
' Draw the tab page and the tab items.
Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs)
    MyBase.OnPaint(e)

    If Not TabRenderer.IsSupported Then
        Me.Parent.Text = "CustomTabControl Disabled"
        Return
    End If

    TabRenderer.DrawTabPage(e.Graphics, tabPageRectangle)
    TabRenderer.DrawTabItem(e.Graphics, tabItemRectangle1, _
        tab1Text, Me.Font, tab1Focused, tab1State)
    TabRenderer.DrawTabItem(e.Graphics, tabItemRectangle2, _
        tab2Text, Me.Font, tab2Focused, tab2State)
    Me.Parent.Text = "CustomTabControl Enabled"
End Sub

설명

이 메서드를 호출 하기 전에 있는지 확인 해야 합니다 IsSupported 속성이 반환 true합니다.

적용 대상

DrawTabItem(Graphics, Rectangle, String, Font, TextFormatFlags, Boolean, TabItemState)

지정된 상태, 범위, 텍스트, 텍스트 서식 및 포커스 영역(선택 사항)을 사용하여 탭을 그립니다.

public:
 static void DrawTabItem(System::Drawing::Graphics ^ g, System::Drawing::Rectangle bounds, System::String ^ tabItemText, System::Drawing::Font ^ font, System::Windows::Forms::TextFormatFlags flags, bool focused, System::Windows::Forms::VisualStyles::TabItemState state);
public static void DrawTabItem (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string tabItemText, System.Drawing.Font font, System.Windows.Forms.TextFormatFlags flags, bool focused, System.Windows.Forms.VisualStyles.TabItemState state);
public static void DrawTabItem (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string? tabItemText, System.Drawing.Font? font, System.Windows.Forms.TextFormatFlags flags, bool focused, System.Windows.Forms.VisualStyles.TabItemState state);
static member DrawTabItem : System.Drawing.Graphics * System.Drawing.Rectangle * string * System.Drawing.Font * System.Windows.Forms.TextFormatFlags * bool * System.Windows.Forms.VisualStyles.TabItemState -> unit
Public Shared Sub DrawTabItem (g As Graphics, bounds As Rectangle, tabItemText As String, font As Font, flags As TextFormatFlags, focused As Boolean, state As TabItemState)

매개 변수

g
Graphics

탭을 그릴 때 사용되는 Graphics입니다.

bounds
Rectangle

탭의 범위를 지정하는 Rectangle입니다.

tabItemText
String

탭에 그릴 String입니다.

font
Font

tabItemText에 적용할 Font입니다.

flags
TextFormatFlags

TextFormatFlags 값의 비트 조합입니다.

focused
Boolean

포커스 영역을 그리려면 true로 설정하고, 그렇지 않으면 false로 설정합니다.

state
TabItemState

탭의 표시 상태를 지정하는 TabItemState 값 중 하나입니다.

예외

운영 체제에서 비주얼 스타일을 지원하지 않는 경우

또는

운영 체제에서 사용자가 비주얼 스타일을 사용하지 않도록 설정한 경우

또는

비주얼 스타일이 애플리케이션 창의 클라이언트 영역에 적용되지 않은 경우

설명

이 메서드를 호출 하기 전에 있는지 확인 해야 합니다 IsSupported 속성이 반환 true합니다.

적용 대상

DrawTabItem(Graphics, Rectangle, String, Font, Image, Rectangle, Boolean, TabItemState)

지정된 상태, 범위, 텍스트, 이미지 및 포커스 영역(선택 사항)을 사용하여 탭을 그립니다.

public:
 static void DrawTabItem(System::Drawing::Graphics ^ g, System::Drawing::Rectangle bounds, System::String ^ tabItemText, System::Drawing::Font ^ font, System::Drawing::Image ^ image, System::Drawing::Rectangle imageRectangle, bool focused, System::Windows::Forms::VisualStyles::TabItemState state);
public static void DrawTabItem (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string tabItemText, System.Drawing.Font font, System.Drawing.Image image, System.Drawing.Rectangle imageRectangle, bool focused, System.Windows.Forms.VisualStyles.TabItemState state);
public static void DrawTabItem (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string? tabItemText, System.Drawing.Font? font, System.Drawing.Image image, System.Drawing.Rectangle imageRectangle, bool focused, System.Windows.Forms.VisualStyles.TabItemState state);
static member DrawTabItem : System.Drawing.Graphics * System.Drawing.Rectangle * string * System.Drawing.Font * System.Drawing.Image * System.Drawing.Rectangle * bool * System.Windows.Forms.VisualStyles.TabItemState -> unit
Public Shared Sub DrawTabItem (g As Graphics, bounds As Rectangle, tabItemText As String, font As Font, image As Image, imageRectangle As Rectangle, focused As Boolean, state As TabItemState)

매개 변수

g
Graphics

탭을 그릴 때 사용되는 Graphics입니다.

bounds
Rectangle

탭의 범위를 지정하는 Rectangle입니다.

tabItemText
String

탭에 그릴 String입니다.

font
Font

tabItemText에 적용할 Font입니다.

image
Image

탭에 그릴 Image입니다.

imageRectangle
Rectangle

image의 범위를 지정하는 Rectangle입니다.

focused
Boolean

포커스 영역을 그리려면 true로 설정하고, 그렇지 않으면 false로 설정합니다.

state
TabItemState

탭의 표시 상태를 지정하는 TabItemState 값 중 하나입니다.

예외

운영 체제에서 비주얼 스타일을 지원하지 않는 경우

또는

운영 체제에서 사용자가 비주얼 스타일을 사용하지 않도록 설정한 경우

또는

비주얼 스타일이 애플리케이션 창의 클라이언트 영역에 적용되지 않은 경우

설명

이 메서드를 호출 하기 전에 있는지 확인 해야 합니다 IsSupported 속성이 반환 true합니다.

적용 대상

DrawTabItem(Graphics, Rectangle, String, Font, TextFormatFlags, Image, Rectangle, Boolean, TabItemState)

지정된 상태, 범위, 텍스트, 텍스트 서식, 이미지 및 포커스 영역(선택 사항)을 사용하여 탭을 그립니다.

public:
 static void DrawTabItem(System::Drawing::Graphics ^ g, System::Drawing::Rectangle bounds, System::String ^ tabItemText, System::Drawing::Font ^ font, System::Windows::Forms::TextFormatFlags flags, System::Drawing::Image ^ image, System::Drawing::Rectangle imageRectangle, bool focused, System::Windows::Forms::VisualStyles::TabItemState state);
public static void DrawTabItem (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string tabItemText, System.Drawing.Font font, System.Windows.Forms.TextFormatFlags flags, System.Drawing.Image image, System.Drawing.Rectangle imageRectangle, bool focused, System.Windows.Forms.VisualStyles.TabItemState state);
public static void DrawTabItem (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string? tabItemText, System.Drawing.Font? font, System.Windows.Forms.TextFormatFlags flags, System.Drawing.Image image, System.Drawing.Rectangle imageRectangle, bool focused, System.Windows.Forms.VisualStyles.TabItemState state);
static member DrawTabItem : System.Drawing.Graphics * System.Drawing.Rectangle * string * System.Drawing.Font * System.Windows.Forms.TextFormatFlags * System.Drawing.Image * System.Drawing.Rectangle * bool * System.Windows.Forms.VisualStyles.TabItemState -> unit
Public Shared Sub DrawTabItem (g As Graphics, bounds As Rectangle, tabItemText As String, font As Font, flags As TextFormatFlags, image As Image, imageRectangle As Rectangle, focused As Boolean, state As TabItemState)

매개 변수

g
Graphics

탭을 그릴 때 사용되는 Graphics입니다.

bounds
Rectangle

탭의 범위를 지정하는 Rectangle입니다.

tabItemText
String

탭에 그릴 String입니다.

font
Font

tabItemText에 적용할 Font입니다.

flags
TextFormatFlags

TextFormatFlags 값의 비트 조합입니다.

image
Image

탭에 그릴 Image입니다.

imageRectangle
Rectangle

image의 범위를 지정하는 Rectangle입니다.

focused
Boolean

포커스 영역을 그리려면 true로 설정하고, 그렇지 않으면 false로 설정합니다.

state
TabItemState

탭의 표시 상태를 지정하는 TabItemState 값 중 하나입니다.

예외

운영 체제에서 비주얼 스타일을 지원하지 않는 경우

또는

운영 체제에서 사용자가 비주얼 스타일을 사용하지 않도록 설정한 경우

또는

비주얼 스타일이 애플리케이션 창의 클라이언트 영역에 적용되지 않은 경우

설명

이 메서드를 호출 하기 전에 있는지 확인 해야 합니다 IsSupported 속성이 반환 true합니다.

적용 대상