menu

WinForms

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

    Show / Hide Table of Contents

    Class TabBarPage

    TabPage implements a single page of a tab bar control. It is essentially a panel that can host other child controls. The TabBarSplitterControl will display the text property of this control as a label in the associated tab.

    Inheritance
    System.Object
    TabBarPage
    WorksheetView
    Implements
    IDynamicSplitterFrame
    IThemedControl
    System.Windows.Forms.IContainerControl
    Namespace: Syncfusion.Windows.Forms
    Assembly: Syncfusion.Shared.Base.dll
    Syntax
    public class TabBarPage : ContainerControl, IDynamicSplitterFrame, IInternalSplitterParent, IThemedControl, IContainerControl

    Constructors

    TabBarPage()

    Initializes a new TabBarPage.

    Declaration
    public TabBarPage()

    TabBarPage(String)

    Constructs a TabBarPage with text for the tab.

    Declaration
    public TabBarPage(string text)
    Parameters
    Type Name Description
    System.String text

    The text for this tab.

    Properties

    ActiveControl

    Declaration
    public Control ActiveControl { get; set; }
    Property Value
    Type
    System.Windows.Forms.Control

    ActivePane

    Gets / sets the active pane in the splitter control.

    Declaration
    public Control ActivePane { get; set; }
    Property Value
    Type
    System.Windows.Forms.Control

    Anchor

    Declaration
    public override AnchorStyles Anchor { get; set; }
    Property Value
    Type
    System.Windows.Forms.AnchorStyles

    ColumnCount

    Returns the number of visible column panes.

    Declaration
    public int ColumnCount { get; }
    Property Value
    Type
    System.Int32

    DisplayRectangle

    Declaration
    public override Rectangle DisplayRectangle { get; }
    Property Value
    Type
    System.Drawing.Rectangle

    Dock

    Declaration
    public override DockStyle Dock { get; set; }
    Property Value
    Type
    System.Windows.Forms.DockStyle

    Enabled

    Enables / disables this page in a TabBarSplitterControl.

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

    HasControlFocus

    Indicates whether both OnControlGotFocus() has been called. OnControlLostFocus() resets this flag.

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

    HSplitPos

    Gets / sets the horizontal splitter position in percentages of the splitter control's width.

    Declaration
    public int HSplitPos { get; set; }
    Property Value
    Type
    System.Int32

    Icon

    Gets / sets the icon displayed on the tab.

    Declaration
    public Icon Icon { get; set; }
    Property Value
    Type Description
    System.Drawing.Icon

    An Icon value.

    IsActiveControl

    Indicates whether the OnEnter(EventArgs) has been called. OnLeave(EventArgs) resets this flag.

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

    IsDeactivated

    Indicates whether both OnDeactivated(EventArgs) has been called. OnEnter(EventArgs) resets this flag.

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

    IsValidated

    Indicates whether the OnValidated(EventArgs) method has been called. OnLeave(EventArgs) and OnEnter(EventArgs) resets this flag.

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

    IsValidating

    Indicates whether the OnValidating(CancelEventArgs) method has been called. OnLeave(EventArgs) and OnEnter(EventArgs) resets this flag.

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

    RowCount

    Returns the number of visible row panes.

    Declaration
    public int RowCount { get; }
    Property Value
    Type
    System.Int32

    Size

    Declaration
    public Size Size { get; set; }
    Property Value
    Type
    System.Drawing.Size

    SplitBars

    Gets / sets a value indicating what split behavior is supported. Rows, columns or both.

    Declaration
    public DynamicSplitBars SplitBars { get; set; }
    Property Value
    Type
    DynamicSplitBars

    SplitterLayout

    Gets / sets the SplitterLayout that holds information about current vertical and horizontal split positions.

    Declaration
    public virtual SplitterLayout SplitterLayout { get; set; }
    Property Value
    Type
    SplitterLayout

    TabBackColor

    Gets or sets back color for TabBarPage Tab.

    Declaration
    public Color TabBackColor { get; set; }
    Property Value
    Type
    System.Drawing.Color

    TabBarColor

    Declaration
    public Color TabBarColor { get; set; }
    Property Value
    Type
    System.Drawing.Color

    TabEnabled

    Gets or set the value indicating whether the TabBarPage is enabled or not

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

    TabIndex

    Declaration
    public int TabIndex { get; set; }
    Property Value
    Type
    System.Int32

    TabMaxWidth

    Sets the Maximum width for the TabBarPage

    Declaration
    public int TabMaxWidth { get; set; }
    Property Value
    Type
    System.Int32

    TabStop

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

    Text

    Declaration
    public string Text { get; set; }
    Property Value
    Type
    System.String

    ThemesEnabled

    Indicates whether themes are enabled for this control.

    Declaration
    public virtual bool ThemesEnabled { get; set; }
    Property Value
    Type
    System.Boolean

    ToolTipText

    Gets / sets the ToolTip text for the tab that will appear when the mouse hovers over the tab and the TabBarSplitterControl's showToolTips property is True.

    Declaration
    public string ToolTipText { get; set; }
    Property Value
    Type
    System.String

    Visible

    Gets or sets the visibility of the control.

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

    VSplitPos

    Gets / sets the vertical splitter position in percentages of the splitter control's height.

    Declaration
    public int VSplitPos { get; set; }
    Property Value
    Type
    System.Int32

    Methods

    ActivateControl(Control)

    Activates a specified control.

    Declaration
    public bool ActivateControl(Control c)
    Parameters
    Type Name Description
    System.Windows.Forms.Control c

    The System.Windows.Forms.Control being activated.

    Returns
    Type Description
    System.Boolean

    True if the control is successfully activated; False otherwise.

    Remarks

    The control must be a child of the container control.

    ActivateNext(Boolean)

    Activates the next or previous pane.

    Declaration
    public void ActivateNext(bool prev)
    Parameters
    Type Name Description
    System.Boolean prev

    True if previous pane should be activated; False if next pane should be activated.

    CanActivateNext(Boolean)

    Indicates whether there is a next or previous pane that can be activated.

    Declaration
    public bool CanActivateNext(bool prev)
    Parameters
    Type Name Description
    System.Boolean prev

    True if previous pane should be activated; False if next pane should be activated.

    Returns
    Type Description
    System.Boolean

    True if activating next or previous pane is good; False if already at last or first pane.

    CreateControlsInstance()

    Declaration
    protected override Control.ControlCollection CreateControlsInstance()
    Returns
    Type
    System.Windows.Forms.Control.ControlCollection

    DeleteColumn(Int32)

    Closes the splitter panes at the specified column.

    Declaration
    public void DeleteColumn(int column)
    Parameters
    Type Name Description
    System.Int32 column

    The zero-based index for the splitter pane column.

    DeleteRow(Int32)

    Closes the splitter panes at the specified row.

    Declaration
    public void DeleteRow(int row)
    Parameters
    Type Name Description
    System.Int32 row

    The zero-based index for the splitter pane row.

    Dispose(Boolean)

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    DisposePane(Int32, Int32)

    Closes the specified pane.

    Declaration
    public virtual void DisposePane(int row, int column)
    Parameters
    Type Name Description
    System.Int32 row

    The zero-based index for the splitter pane row.

    System.Int32 column

    The zero-based index for the splitter pane column.

    FindPane(Control, out Int32, out Int32)

    Returns the row and column index for a child pane.

    Declaration
    public bool FindPane(Control control, out int row, out int column)
    Parameters
    Type Name Description
    System.Windows.Forms.Control control

    The control to search for.

    System.Int32 row

    A placeholder where the row is returned.

    System.Int32 column

    A placeholder where the column is returned.

    Returns
    Type Description
    System.Boolean

    True if the control is a pane; False if the control was not a child pane.

    GetPane(Int32, Int32)

    Returns the splitter pane at the specified row and column. If there is no pane found at the specified row and column a pane will be created on demand with a call to OnCreateNewControl(Int32, Int32, Control).

    Declaration
    public Control GetPane(int row, int column)
    Parameters
    Type Name Description
    System.Int32 row

    The zero-based index for the splitter pane row.

    System.Int32 column

    The zero-based index for the splitter pane column.

    Returns
    Type Description
    System.Windows.Forms.Control

    The control at the pane.

    GetTabBarPageOfComponent(Object)

    Given a component, this retrieves the tab page that it is parented to or NULL if it is not parented to any tab page.

    Declaration
    public static TabBarPage GetTabBarPageOfComponent(object comp)
    Parameters
    Type Name Description
    System.Object comp

    The component to check.

    Returns
    Type Description
    TabBarPage

    A TabBarPage that the component is parented to or NULL if no such page exists. This will return the component if it is an instance of TabBarPage.

    InvalidateSplitter(Object)

    Repaints the splitter bar.

    Declaration
    public virtual void InvalidateSplitter(object sender)
    Parameters
    Type Name Description
    System.Object sender

    The source of the event.

    IsActive(Control, ScrollBars)

    Indicates whether the scrollbar belongs to the active pane.

    Declaration
    public bool IsActive(Control control, ScrollBars sbType)
    Parameters
    Type Name Description
    System.Windows.Forms.Control control

    The control associated with the scrollbar.

    System.Windows.Forms.ScrollBars sbType

    Specifies the vertical or horizontal scrollbar.

    Returns
    Type Description
    System.Boolean

    True if active; False otherwise.

    Examples

    ScrollControl checks IsActive to find out if it is target of a HScroll event

    		protected virtual void OnHScroll(object sender, ScrollEventArgs se)
    		{
    			try
    			{
    				IScrollBarFrame sbf = GetScrollBarFrameOfComponent(this);
    				if (sbf != null && !sbf.IsActive(this, ScrollBars.Horizontal))
    					return;
    }}

    OnControlAdded(ControlEventArgs)

    Declaration
    protected override void OnControlAdded(ControlEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.ControlEventArgs e

    OnControlGotFocus()

    Raises the System.Windows.Forms.Control.GotFocus event. This method is called when the control or any child control gets focus and this control did not have focus before.

    Declaration
    protected virtual void OnControlGotFocus()
    Remarks

    Inheriting classes should override this method instead of overriding System.Windows.Forms.Control.OnGotFocus(System.EventArgs) because OnControlGotFocus() is also called when child controls get focus and it is not called when focus is moved within child controls of this control.

    OnControlLostFocus()

    Raises the System.Windows.Forms.Control.LostFocus event. This method is called when the control or any child control loses focus and the newly focused control is not a child of this control.

    Declaration
    protected virtual void OnControlLostFocus()
    Remarks

    Inheriting classed should override this method instead of overriding System.Windows.Forms.Control.OnLostFocus(System.EventArgs) because OnControlLostFocus() is also called when child controls lose focus and it is not called when focus is moved within child controls of this control.

    OnControlRemoved(ControlEventArgs)

    Declaration
    protected override void OnControlRemoved(ControlEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.ControlEventArgs e

    OnDeactivated(EventArgs)

    Raises the Deactivated event.

    Declaration
    protected virtual void OnDeactivated(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    An System.EventArgs that contains the event data.

    OnEnter(EventArgs)

    Declaration
    protected override void OnEnter(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    OnGotFocus(EventArgs)

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

    OnHSplitPosChanged(EventArgs)

    Raises the HSplitPosChanged event.

    Declaration
    protected virtual void OnHSplitPosChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    Event data.

    OnLayout(LayoutEventArgs)

    Declaration
    protected override void OnLayout(LayoutEventArgs levent)
    Parameters
    Type Name Description
    System.Windows.Forms.LayoutEventArgs levent

    OnLeave(EventArgs)

    Declaration
    protected override void OnLeave(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    OnLostFocus(EventArgs)

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

    OnMovedSplitter(Object)

    Occurs after the user has moved the splitter bar.

    Declaration
    public virtual void OnMovedSplitter(object sender)
    Parameters
    Type Name Description
    System.Object sender

    The source of the event.

    OnMoveSplitter(Object, Int32, Int32)

    Occurs when the user drags the splitterbar.

    Declaration
    public virtual void OnMoveSplitter(object sender, int x, int y)
    Parameters
    Type Name Description
    System.Object sender

    The source of the event.

    System.Int32 x

    The current horizontal position in pixels.

    System.Int32 y

    The current vertical position in pixels.

    OnPaint(PaintEventArgs)

    Declaration
    protected override void OnPaint(PaintEventArgs pe)
    Parameters
    Type Name Description
    System.Windows.Forms.PaintEventArgs pe

    OnPaneClosing(SplitterPaneEventArgs)

    Raises the PaneClosing event.

    Declaration
    protected virtual void OnPaneClosing(SplitterPaneEventArgs e)
    Parameters
    Type Name Description
    SplitterPaneEventArgs e

    A SplitterPaneEventArgs that contains the event data.

    OnPaneCreated(SplitterPaneEventArgs)

    Raises the PaneCreated event.

    Declaration
    protected virtual void OnPaneCreated(SplitterPaneEventArgs e)
    Parameters
    Type Name Description
    SplitterPaneEventArgs e

    A SplitterPaneEventArgs that contains the event data.

    OnParentChanged(EventArgs)

    Declaration
    protected override void OnParentChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    OnSetCursor(ref Message)

    Declaration
    protected virtual void OnSetCursor(ref Message m)
    Parameters
    Type Name Description
    System.Windows.Forms.Message m

    OnSplitBarsChanged(EventArgs)

    Raises the SplitBarsChanged event.

    Declaration
    protected virtual void OnSplitBarsChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    Event data.

    OnSplitterLayoutChanged(EventArgs)

    Raises the SplitterLayoutChanged event.

    Declaration
    protected virtual void OnSplitterLayoutChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    Event data.

    OnTextChanged(EventArgs)

    Declaration
    protected override void OnTextChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    OnThemeChanged(EventArgs)

    Raises the ThemeChanged event.

    Declaration
    protected virtual void OnThemeChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    An EventArgs that contains the event data.

    Remarks

    The OnThemeChanged method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

    Note to Inheritors: When overriding OnThemeChanged in a derived class, be sure to call the base class's OnThemeChanged method so that registered delegates receive the event.

    OnToolTipTextChanged(EventArgs)

    Raises the ToolTipTextChanged event.

    Declaration
    protected virtual void OnToolTipTextChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    Event data.

    OnValidated(EventArgs)

    Declaration
    protected override void OnValidated(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    OnValidating(CancelEventArgs)

    Declaration
    protected override void OnValidating(CancelEventArgs e)
    Parameters
    Type Name Description
    System.ComponentModel.CancelEventArgs e

    OnValidatingLostFocus()

    This method is called if the control's OnControlLostFocus() notification occurs while handling a System.Windows.Forms.Control.Validating event. This typically occurs if a message box is displayed from a System.Windows.Forms.Control.Validating event handler.

    Declaration
    protected virtual void OnValidatingLostFocus()

    OnVSplitPosChanged(EventArgs)

    Raises the VSplitPosChanged event.

    Declaration
    protected virtual void OnVSplitPosChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    QueryFocusInside()

    Indicates whether this control contains focus. If ActiveControl implements IQueryFocusInside, the QueryFocusInside() method is called on the ActiveControl.

    Declaration
    public virtual bool QueryFocusInside()
    Returns
    Type Description
    System.Boolean

    True if the control or any child control has focus; False otherwise.

    ResetTabBarColor()

    To Reset TabBarColor

    Declaration
    public void ResetTabBarColor()

    SetActivePane(Int32, Int32)

    Sets the active pane in the splitter control specified by the row and column indices.

    Declaration
    public void SetActivePane(int row, int column)
    Parameters
    Type Name Description
    System.Int32 row

    The zero-based index for the splitter pane row.

    System.Int32 column

    The zero-based index for the splitter pane column.

    ShouldSerializeTabBarColor()

    Indicate whether to serialize TabBarColor

    Declaration
    public bool ShouldSerializeTabBarColor()
    Returns
    Type
    System.Boolean

    SplitColumn(Int32)

    Indicates whether we can split the columns horizontally at the specified x coordinate.

    Declaration
    public bool SplitColumn(int cx)
    Parameters
    Type Name Description
    System.Int32 cx

    The horizontal position in percentages of the splitter control's width.

    Returns
    Type Description
    System.Boolean

    True if columns were split successfully; False if they were already split or the operation aborted.

    SplitRow(Int32)

    Indicates whether we can split the rows at the given y coordinate.

    Declaration
    public bool SplitRow(int cy)
    Parameters
    Type Name Description
    System.Int32 cy

    The vertical position in percentages of the splitter control's height.

    Returns
    Type Description
    System.Boolean

    True if rows were split successfully; False if they were already split or the operation aborted.

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type
    System.String

    UnwireChildControl(Control)

    Declaration
    protected virtual void UnwireChildControl(Control c)
    Parameters
    Type Name Description
    System.Windows.Forms.Control c

    WireChildControl(Control)

    Declaration
    protected virtual void WireChildControl(Control c)
    Parameters
    Type Name Description
    System.Windows.Forms.Control c

    WndProc(ref Message)

    Declaration
    protected override void WndProc(ref Message msg)
    Parameters
    Type Name Description
    System.Windows.Forms.Message msg

    Events

    Deactivated

    Occurs when both OnControlLostFocus() and OnLeave(EventArgs) occurs.

    Declaration
    public event EventHandler Deactivated
    Event Type
    Type
    System.EventHandler

    HSplitPosChanged

    Occurs when the horizontal splitter position has changed.

    Declaration
    public event EventHandler HSplitPosChanged
    Event Type
    Type
    System.EventHandler

    PaneClosing

    Occurs after a row or column is hidden and before the control that is displayed in the pane is disposed. Use this event to implement additional clean up for the control before DisposePane(Int32, Int32) is called.

    Declaration
    public event SplitterPaneEventHandler PaneClosing
    Event Type
    Type
    SplitterPaneEventHandler
    Remarks

    PaneClosing is an ideal hook to unwire event handlers from the control.

    PaneCreated

    Occurs after the control to be displayed in a new pane has been created. Use this event to implement additional initialization for the new control.

    Declaration
    public event SplitterPaneEventHandler PaneCreated
    Event Type
    Type
    SplitterPaneEventHandler
    Remarks

    PaneCreated is an ideal hook to add handler for events in the new control.

    SplitBarsChanged

    Occurs when the SplitBars property has changed.

    Declaration
    public event EventHandler SplitBarsChanged
    Event Type
    Type
    System.EventHandler

    SplitterLayoutChanged

    Occurs when the splitter layout has changed.

    Declaration
    public event EventHandler SplitterLayoutChanged
    Event Type
    Type
    System.EventHandler

    ThemeChanged

    Fired when the ThemesEnabled property changes.

    Declaration
    public event EventHandler ThemeChanged
    Event Type
    Type
    System.EventHandler

    ToolTipTextChanged

    Occurs when the ToolTipText property has changed.

    Declaration
    public event EventHandler ToolTipTextChanged
    Event Type
    Type
    System.EventHandler

    VSplitPosChanged

    Occurs when the vertical splitter position has changed.

    Declaration
    public event EventHandler VSplitPosChanged
    Event Type
    Type
    System.EventHandler

    Explicit Interface Implementations

    IDynamicSplitterFrame.ActivePane

    Declaration
    Control IDynamicSplitterFrame.ActivePane { get; set; }
    Returns
    Type
    System.Windows.Forms.Control

    IDynamicSplitterFrame.ColumnCount

    Declaration
    int IDynamicSplitterFrame.ColumnCount { get; }
    Returns
    Type
    System.Int32

    IDynamicSplitterFrame.RowCount

    Declaration
    int IDynamicSplitterFrame.RowCount { get; }
    Returns
    Type
    System.Int32

    IDynamicSplitterFrame.SplitBars

    Declaration
    DynamicSplitBars IDynamicSplitterFrame.SplitBars { get; }
    Returns
    Type
    DynamicSplitBars

    Implements

    IDynamicSplitterFrame
    IThemedControl
    System.Windows.Forms.IContainerControl
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved