menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Interface ITabPanelRenderer - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Interface ITabPanelRenderer

    The interface you should implement to create a custom tab panel renderer.

    Namespace: Syncfusion.Windows.Forms.Tools
    Assembly: Syncfusion.Tools.Windows.dll
    Syntax
    public interface ITabPanelRenderer
    Remarks

    The base interface that the SingleLineTabPanelRenderer and the MultilineTabPanelRenderer derive from.

    Properties

    Bounds

    Gets / sets the current bounds of the tab panel.

    Declaration
    RectangleF Bounds { get; set; }
    Property Value
    Type
    System.Drawing.RectangleF

    CanScrollLeft

    Indicates whether scrolling to the left is allowed for the current layout.

    Declaration
    bool CanScrollLeft { get; }
    Property Value
    Type
    System.Boolean

    CanScrollRight

    Indicates whether scrolling to the right is allowed for the current layout.

    Declaration
    bool CanScrollRight { get; }
    Property Value
    Type
    System.Boolean

    ForceDrawImage

    If to draw image anyway.

    Declaration
    bool ForceDrawImage { get; set; }
    Property Value
    Type
    System.Boolean

    IsMirrored

    Declaration
    bool IsMirrored { get; }
    Property Value
    Type
    System.Boolean

    NeedLayout

    Indicates whether the tabs need to be laid out due to change in some property.

    Declaration
    bool NeedLayout { get; }
    Property Value
    Type
    System.Boolean

    NeedMouseMove

    Indicates whether the parent tab control should forward mouse move messages to the renderer.

    Declaration
    bool NeedMouseMove { get; }
    Property Value
    Type
    System.Boolean

    Renderers

    Declaration
    ArrayList Renderers { get; }
    Property Value
    Type
    System.Collections.ArrayList

    ScrollingSupported

    Indicates whether scrolling is supported.

    Declaration
    bool ScrollingSupported { get; }
    Property Value
    Type
    System.Boolean

    TabPanelBackColor

    Returns the tab panel's backcolor.

    Declaration
    Color TabPanelBackColor { get; }
    Property Value
    Type
    System.Drawing.Color

    TabPanelData

    Gets / sets the ITabPanelData that contains information regarding tab panel.

    Declaration
    ITabPanelData TabPanelData { get; set; }
    Property Value
    Type
    ITabPanelData

    Methods

    ApplyDrawingTransform(RectangleF, Boolean)

    Transforms the RectangleF in client co-ordinates to rotated drawing co-ordinates or vice-versa.

    Declaration
    RectangleF ApplyDrawingTransform(RectangleF rect, bool apply)
    Parameters
    Type Name Description
    System.Drawing.RectangleF rect

    The RectangleF to transform.

    System.Boolean apply

    Indicates whether to transform to drawing co-ordinates or to transform to client co-ordinates.

    Returns
    Type Description
    System.Drawing.RectangleF

    The transformed System.Drawing.RectangleF.

    CancelTabDrag()

    Cancels current tab dragging, if any.

    Declaration
    void CancelTabDrag()

    GetMousePosition()

    Returns the mouse position.

    Declaration
    Point GetMousePosition()
    Returns
    Type
    System.Drawing.Point

    GetPreferredSize(Graphics, ref SizeF)

    Returns the preferred size of the tab panel.

    Declaration
    void GetPreferredSize(Graphics g, ref SizeF size)
    Parameters
    Type Name Description
    System.Drawing.Graphics g

    The System.Drawing.Graphics context to help calculate the sizes.

    System.Drawing.SizeF size

    The System.Drawing.SizeF that should contain the preferred size when returned.

    Remarks

    A non-zero width in the size parameter indicates the available width and requires you to provide the preferred height for that width. Zero width in the size parameter indicates you to provide the preferred width and height for the tab panel, assuming infinite available width.

    GetTabBounds(Int32)

    Returns the bounds of the specified tab.

    Declaration
    Rectangle GetTabBounds(int i)
    Parameters
    Type Name Description
    System.Int32 i
    Returns
    Type
    System.Drawing.Rectangle

    HitTestTabs(PointF, Boolean)

    Returns the tab position under the specified co-ords.

    Declaration
    int HitTestTabs(PointF mousePosition, bool inTransformedCoOrds)
    Parameters
    Type Name Description
    System.Drawing.PointF mousePosition

    The mouse position in client or transformed drawing co-ords.

    System.Boolean inTransformedCoOrds

    Indicates whether the mouse position is in transformed drawing co-ordinates or client co-ordinates.

    Returns
    Type Description
    System.Int32

    The hit tab's index; -1 if none found.

    IsBackgroundSolid()

    Indicates whether the background color is solid.

    Declaration
    bool IsBackgroundSolid()
    Returns
    Type Description
    System.Boolean

    True if solid; false otherwise.

    IsMovingTab()

    Indicates whether a tab is currently being moved.

    Declaration
    bool IsMovingTab()
    Returns
    Type Description
    System.Boolean

    True if moving; false otherwise.

    Layout(Graphics, Boolean)

    Lays out the tabs according to the current bounds.

    Declaration
    void Layout(Graphics g, bool fromPaint)
    Parameters
    Type Name Description
    System.Drawing.Graphics g

    The System.Drawing.Graphics instance.

    System.Boolean fromPaint

    Indicates whether this method was called from the Paint event.

    OnGotFocus(EventArgs)

    Called by the parent tab control to forward got focus messages.

    Declaration
    void OnGotFocus(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    The System.EventArgs that has some information regarding this event.

    OnLostFocus(EventArgs)

    Called by the parent tab control to forward lost focus messages.

    Declaration
    void OnLostFocus(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    The System.EventArgs that has some information regarding this event.

    OnMouseDown(MouseEventArgs)

    Called by the parent tab control to forward mouse down messages.

    Declaration
    void OnMouseDown(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs e

    The System.Windows.Forms.MouseEventArgs that has some information regarding this event.

    OnMouseLeave(EventArgs)

    Called by the parent tab control to forward mouse leave messages.

    Declaration
    void OnMouseLeave(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    The System.Windows.Forms.MouseEventArgs that has some information regarding this event.

    OnMouseMove(MouseEventArgs)

    Called by the parent tab control to forward mouse move messages.

    Declaration
    void OnMouseMove(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs e

    The System.Windows.Forms.MouseEventArgs that has some information regarding this event.

    OnMouseUp(MouseEventArgs)

    Called by the parent tab control to forward mouse up messages.

    Declaration
    void OnMouseUp(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs e

    The System.Windows.Forms.MouseEventArgs that has some information regarding this event.

    OnPaint(Graphics, Rectangle)

    Paints the tab panel with the tabs.

    Declaration
    void OnPaint(Graphics g, Rectangle clipRect)
    Parameters
    Type Name Description
    System.Drawing.Graphics g

    The System.Drawing.Graphics instance.

    System.Drawing.Rectangle clipRect

    The clipping rectangle to use while drawing.

    OnPaintPanelBackground(Graphics, Color, Rectangle)

    Paints the tab panel background.

    Declaration
    void OnPaintPanelBackground(Graphics g, Color backColor, Rectangle rect)
    Parameters
    Type Name Description
    System.Drawing.Graphics g

    The System.Drawing.Graphics instance.

    System.Drawing.Color backColor

    The background System.Drawing.Color.

    System.Drawing.Rectangle rect

    The background bounds.

    Scroll(ScrollIncrement, ScrollDirection)

    Scrolls the tabs based on the specified ScrollIncrement and ScrollDirection

    Declaration
    void Scroll(ScrollIncrement increment, ScrollDirection direction)
    Parameters
    Type Name Description
    ScrollIncrement increment
    ScrollDirection direction

    ValidateScrollOffset(Boolean, Boolean)

    Ensures that the current scroll position is valid.

    Declaration
    void ValidateScrollOffset(bool makeSelectedTabVisible, bool invalidate)
    Parameters
    Type Name Description
    System.Boolean makeSelectedTabVisible

    Indicates whether to make the selected tab visible.

    System.Boolean invalidate

    Indicates whether to redraw the invalid regions.

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved