TabRenderer.DrawTabPage メソッド
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)




カスタム コントロールの OnPaint メソッド内の DrawTabPage メソッドを使用して、タブ ページを描画するコード例を次に示します。このコード例は、TabRenderer クラスのトピックで取り上げているコード例の一部分です。
' 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
// 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: 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"; }

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からTabRenderer.DrawTabPage メソッドを検索する場合は、下記のリンクをクリックしてください。

- TabRenderer.DrawTabPage メソッドのページへのリンク