Show / Hide Table of Contents

Class TabControl

Inheritance
System.Object
System.MarshalByRefObject
System.ComponentModel.Component
System.Windows.Forms.Control
Manina.Windows.Forms.PagedControl
TabControl
Inherited Members
Manina.Windows.Forms.PagedControl.OnPageChanging(Manina.Windows.Forms.PageChangingEventArgs)
Manina.Windows.Forms.PagedControl.OnPageValidating(Manina.Windows.Forms.PageValidatingEventArgs)
Manina.Windows.Forms.PagedControl.OnPageValidated(Manina.Windows.Forms.PageEventArgs)
Manina.Windows.Forms.PagedControl.OnPageHidden(Manina.Windows.Forms.PageEventArgs)
Manina.Windows.Forms.PagedControl.OnPageShown(Manina.Windows.Forms.PageEventArgs)
Manina.Windows.Forms.PagedControl.OnPagePaint(Manina.Windows.Forms.PagePaintEventArgs)
Manina.Windows.Forms.PagedControl.OnCreateUIControls(Manina.Windows.Forms.CreateUIControlsEventArgs)
Manina.Windows.Forms.PagedControl.OnUpdateUIControls(System.EventArgs)
Manina.Windows.Forms.PagedControl.GoBack()
Manina.Windows.Forms.PagedControl.GoNext()
Manina.Windows.Forms.PagedControl.UpdatePages()
Manina.Windows.Forms.PagedControl.ChangePage(Manina.Windows.Forms.Page, System.Boolean)
Manina.Windows.Forms.PagedControl.CreateControlsInstance()
Manina.Windows.Forms.PagedControl.OnInvalidated(System.Windows.Forms.InvalidateEventArgs)
Manina.Windows.Forms.PagedControl.BorderStyle
Manina.Windows.Forms.PagedControl.DefaultSize
Manina.Windows.Forms.PagedControl.CanGoBack
Manina.Windows.Forms.PagedControl.CanGoNext
Manina.Windows.Forms.PagedControl.PageAdded
Manina.Windows.Forms.PagedControl.PageRemoved
Manina.Windows.Forms.PagedControl.PageChanging
Manina.Windows.Forms.PagedControl.PageChanged
Manina.Windows.Forms.PagedControl.PageValidating
Manina.Windows.Forms.PagedControl.PageValidated
Manina.Windows.Forms.PagedControl.PageHidden
Manina.Windows.Forms.PagedControl.PageShown
Manina.Windows.Forms.PagedControl.PagePaint
Manina.Windows.Forms.PagedControl.CreateUIControls
Manina.Windows.Forms.PagedControl.UpdateUIControls
Namespace: Manina.Windows.Forms
Assembly: TabControl.dll
Syntax
[ToolboxBitmap(typeof(TabControl))]
[Docking(DockingBehavior.Ask)]
public class TabControl : PagedControl, UnsafeNativeMethods.IOleControl, UnsafeNativeMethods.IOleObject, UnsafeNativeMethods.IOleInPlaceObject, UnsafeNativeMethods.IOleInPlaceActiveObject, UnsafeNativeMethods.IOleWindow, UnsafeNativeMethods.IViewObject, UnsafeNativeMethods.IViewObject2, UnsafeNativeMethods.IPersist, UnsafeNativeMethods.IPersistStreamInit, UnsafeNativeMethods.IPersistPropertyBag, UnsafeNativeMethods.IPersistStorage, UnsafeNativeMethods.IQuickActivate, ISupportOleDropSource, IDropTarget, ISynchronizeInvoke, IWin32Window, IArrangedElement, IBindableComponent, IComponent, IDisposable

Constructors

| Improve this Doc View Source

TabControl()

Initializes a new instance of the TabControl class.

Declaration
public TabControl()

Properties

| Improve this Doc View Source

ClientRectangle

Gets the rectangle that represents the client area of the control.

Declaration
[Browsable(false)]
public Rectangle ClientRectangle { get; }
Property Value
Type Description
System.Drawing.Rectangle
| Improve this Doc View Source

CloseTabImage

Gets or sets the image of close buttons.

Declaration
public Image CloseTabImage { get; set; }
Property Value
Type Description
System.Drawing.Image
| Improve this Doc View Source

ContentAlignment

Gets or sets the alignment of tab text.

Declaration
public Alignment ContentAlignment { get; set; }
Property Value
Type Description
Alignment
| Improve this Doc View Source

ContentSpacing

Gets or sets the spacing between tab contents (i.e. icon, text and close button).

Declaration
public int ContentSpacing { get; set; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

DisplayRectangle

Gets the client rectangle where pages are located.

Declaration
[Browsable(false)]
public override Rectangle DisplayRectangle { get; }
Property Value
Type Description
System.Drawing.Rectangle
Overrides
Manina.Windows.Forms.PagedControl.DisplayRectangle
| Improve this Doc View Source

DownArrowImage

Gets or sets the image of a scroll button pointing down.

Declaration
public Image DownArrowImage { get; set; }
Property Value
Type Description
System.Drawing.Image
| Improve this Doc View Source

FarScrollButtonBounds

Gets the bounds of the far scroll button. Although scroll button size is returned by the renderer, it may be resized along with tabs while layout logic is applied.

Declaration
[Browsable(false)]
protected Rectangle FarScrollButtonBounds { get; }
Property Value
Type Description
System.Drawing.Rectangle
| Improve this Doc View Source

Font

Gets or sets the font associated with the control.

Declaration
public override Font Font { get; set; }
Property Value
Type Description
System.Drawing.Font
Overrides
System.Windows.Forms.Control.Font
| Improve this Doc View Source

IsHorizontal

Determines whether the toolbar is horizontal (at top or bottom) or vertical (left or right).

Declaration
[Browsable(false)]
protected bool IsHorizontal { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

LeftArrowImage

Gets or sets the image of a scroll button pointing left.

Declaration
public Image LeftArrowImage { get; set; }
Property Value
Type Description
System.Drawing.Image
| Improve this Doc View Source

MinViewOffset

Gets the mininum value of the scrollable view offset.

Declaration
[Browsable(false)]
protected int MinViewOffset { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

NearScrollButtonBounds

Gets the bounds of the near scroll button. Although scroll button size is returned by the renderer, it may be resized along with tabs while layout logic is applied.

Declaration
[Browsable(false)]
protected Rectangle NearScrollButtonBounds { get; }
Property Value
Type Description
System.Drawing.Rectangle
| Improve this Doc View Source

Pages

Gets or sets the collection of pages.

Declaration
[Browsable(false)]
public override PagedControl.PageCollection Pages { get; }
Property Value
Type Description
Manina.Windows.Forms.PagedControl.PageCollection
Overrides
Manina.Windows.Forms.PagedControl.Pages
| Improve this Doc View Source

Renderer

Gets or sets the renderer associated with the control.

Declaration
[Browsable(false)]
public TabControl.TabControlRenderer Renderer { get; set; }
Property Value
Type Description
TabControl.TabControlRenderer
| Improve this Doc View Source

RightArrowImage

Gets or sets the image of a scroll button pointing right.

Declaration
public Image RightArrowImage { get; set; }
Property Value
Type Description
System.Drawing.Image
| Improve this Doc View Source

ScrollButtons

Gets whether the scroll buttons are visible.

Declaration
[Browsable(false)]
public bool ScrollButtons { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

SelectedIndex

Gets or sets the zero-based index of the selected tab.

Declaration
public override int SelectedIndex { get; set; }
Property Value
Type Description
System.Int32
Overrides
Manina.Windows.Forms.PagedControl.SelectedIndex
| Improve this Doc View Source

SelectedPage

Gets or sets the current page.

Declaration
[Browsable(false)]
public override Page SelectedPage { get; set; }
Property Value
Type Description
Manina.Windows.Forms.Page
Overrides
Manina.Windows.Forms.PagedControl.SelectedPage
| Improve this Doc View Source

SelectedTab

Gets or sets the current tab.

Declaration
public Tab SelectedTab { get; set; }
Property Value
Type Description
Tab
| Improve this Doc View Source

ShowCloseTabButtons

Gets or sets whether to show close tab buttons.

Declaration
public bool ShowCloseTabButtons { get; set; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

TabArea

Gets the client rectangle where tabs are located.

Declaration
[Browsable(false)]
public Rectangle TabArea { get; }
Property Value
Type Description
System.Drawing.Rectangle
| Improve this Doc View Source

TabLocation

Gets or sets the location of tabs.

Declaration
public TabLocation TabLocation { get; set; }
Property Value
Type Description
TabLocation
| Improve this Doc View Source

TabPadding

Gets or sets the padding between the contents a tab and its borders.

Declaration
public Padding TabPadding { get; set; }
Property Value
Type Description
System.Windows.Forms.Padding
| Improve this Doc View Source

Tabs

Gets the collection of tabs.

Declaration
public TabControl.TabCollection Tabs { get; }
Property Value
Type Description
TabControl.TabCollection
| Improve this Doc View Source

TabSize

Gets or sets the size of tabs.

Declaration
public Size TabSize { get; set; }
Property Value
Type Description
System.Drawing.Size
| Improve this Doc View Source

TabSizing

Gets or sets the sizing mode of tabs.

Declaration
public TabSizing TabSizing { get; set; }
Property Value
Type Description
TabSizing
| Improve this Doc View Source

TextDirection

Gets or sets the direction of tab texts.

Declaration
public TextDirection TextDirection { get; set; }
Property Value
Type Description
TextDirection
| Improve this Doc View Source

UpArrowImage

Gets or sets the image of a scroll button pointing up.

Declaration
public Image UpArrowImage { get; set; }
Property Value
Type Description
System.Drawing.Image
| Improve this Doc View Source

ViewOffset

Gets the value of the scrollable view offset.

Declaration
[Browsable(false)]
protected int ViewOffset { get; set; }
Property Value
Type Description
System.Int32

Methods

| Improve this Doc View Source

EnsureVisible(Tab)

Scrolls the control to make sure that the given tab is visible.

Declaration
public void EnsureVisible(Tab tab)
Parameters
Type Name Description
Tab tab

The tab to make visible.

| Improve this Doc View Source

GetCloseButtonBounds(Tab)

Gets the bounding rectangle of the tab in client coordinates.

Declaration
public Rectangle GetCloseButtonBounds(Tab tab)
Parameters
Type Name Description
Tab tab

The tab to calculate bounds for.

Returns
Type Description
System.Drawing.Rectangle
| Improve this Doc View Source

GetFarScrollButtonState()

Gets the visual state of the far scroll button.

Declaration
protected ItemState GetFarScrollButtonState()
Returns
Type Description
ItemState
| Improve this Doc View Source

GetIconBounds(Tab)

Gets the bounding rectangle of the tab in client coordinates.

Declaration
public Rectangle GetIconBounds(Tab tab)
Parameters
Type Name Description
Tab tab

The tab to calculate bounds for.

Returns
Type Description
System.Drawing.Rectangle
| Improve this Doc View Source

GetNearScrollButtonState()

Gets the visual state of the near scroll button.

Declaration
protected ItemState GetNearScrollButtonState()
Returns
Type Description
ItemState
| Improve this Doc View Source

GetTabBounds(Tab)

Gets the bounding rectangle of the tab in client coordinates.

Declaration
public Rectangle GetTabBounds(Tab tab)
Parameters
Type Name Description
Tab tab

The tab to calculate bounds for.

Returns
Type Description
System.Drawing.Rectangle
| Improve this Doc View Source

GetTabCloseButtonState(Tab)

Gets the visual state of the close tab button.

Declaration
protected ItemState GetTabCloseButtonState(Tab tab)
Parameters
Type Name Description
Tab tab

The tab to check.

Returns
Type Description
ItemState
| Improve this Doc View Source

GetTabState(Tab)

Gets the visual state of a tab.

Declaration
protected ItemState GetTabState(Tab tab)
Parameters
Type Name Description
Tab tab

The tab to check.

Returns
Type Description
ItemState
| Improve this Doc View Source

GetTextBounds(Tab)

Gets the bounding rectangle of the tab in client coordinates.

Declaration
public Rectangle GetTextBounds(Tab tab)
Parameters
Type Name Description
Tab tab

The tab to calculate bounds for.

Returns
Type Description
System.Drawing.Rectangle
| Improve this Doc View Source

GetViewOffsetBounds(Rectangle)

Offsets the given bounding rectangle with the view offset.

Declaration
protected Rectangle GetViewOffsetBounds(Rectangle bounds)
Parameters
Type Name Description
System.Drawing.Rectangle bounds

The bounds to offset.

Returns
Type Description
System.Drawing.Rectangle
| Improve this Doc View Source

OnCloseTabButtonClick(CancelTabEventArgs)

Declaration
protected virtual void OnCloseTabButtonClick(CancelTabEventArgs e)
Parameters
Type Name Description
CancelTabEventArgs e
| Improve this Doc View Source

OnFarScrollButtonClick(EventArgs)

Declaration
protected virtual void OnFarScrollButtonClick(EventArgs e)
Parameters
Type Name Description
System.EventArgs e
| Improve this Doc View Source

OnHandleCreated(EventArgs)

Declaration
protected override void OnHandleCreated(EventArgs e)
Parameters
Type Name Description
System.EventArgs e
Overrides
Manina.Windows.Forms.PagedControl.OnHandleCreated(System.EventArgs)
| Improve this Doc View Source

OnLayoutTabs(LayoutTabsEventArgs)

Declaration
protected virtual void OnLayoutTabs(LayoutTabsEventArgs e)
Parameters
Type Name Description
LayoutTabsEventArgs e
| Improve this Doc View Source

OnMeasureScrollButton(MeasureEventArgs)

Declaration
protected virtual void OnMeasureScrollButton(MeasureEventArgs e)
Parameters
Type Name Description
MeasureEventArgs e
| Improve this Doc View Source

OnMeasureTab(MeasureTabEventArgs)

Declaration
protected virtual void OnMeasureTab(MeasureTabEventArgs e)
Parameters
Type Name Description
MeasureTabEventArgs e
| Improve this Doc View Source

OnMouseDoubleClick(MouseEventArgs)

Declaration
protected override void OnMouseDoubleClick(MouseEventArgs e)
Parameters
Type Name Description
System.Windows.Forms.MouseEventArgs e
Overrides
System.Windows.Forms.Control.OnMouseDoubleClick(System.Windows.Forms.MouseEventArgs)
| Improve this Doc View Source

OnMouseDown(MouseEventArgs)

Declaration
protected override void OnMouseDown(MouseEventArgs e)
Parameters
Type Name Description
System.Windows.Forms.MouseEventArgs e
Overrides
System.Windows.Forms.Control.OnMouseDown(System.Windows.Forms.MouseEventArgs)
| Improve this Doc View Source

OnMouseLeave(EventArgs)

Declaration
protected override void OnMouseLeave(EventArgs e)
Parameters
Type Name Description
System.EventArgs e
Overrides
System.Windows.Forms.Control.OnMouseLeave(System.EventArgs)
| Improve this Doc View Source

OnMouseMove(MouseEventArgs)

Declaration
protected override void OnMouseMove(MouseEventArgs e)
Parameters
Type Name Description
System.Windows.Forms.MouseEventArgs e
Overrides
System.Windows.Forms.Control.OnMouseMove(System.Windows.Forms.MouseEventArgs)
| Improve this Doc View Source

OnMouseUp(MouseEventArgs)

Declaration
protected override void OnMouseUp(MouseEventArgs e)
Parameters
Type Name Description
System.Windows.Forms.MouseEventArgs e
Overrides
System.Windows.Forms.Control.OnMouseUp(System.Windows.Forms.MouseEventArgs)
| Improve this Doc View Source

OnMouseWheel(MouseEventArgs)

Declaration
protected override void OnMouseWheel(MouseEventArgs e)
Parameters
Type Name Description
System.Windows.Forms.MouseEventArgs e
Overrides
System.Windows.Forms.Control.OnMouseWheel(System.Windows.Forms.MouseEventArgs)
| Improve this Doc View Source

OnNearScrollButtonClick(EventArgs)

Declaration
protected virtual void OnNearScrollButtonClick(EventArgs e)
Parameters
Type Name Description
System.EventArgs e
| Improve this Doc View Source

OnPageAdded(PageEventArgs)

Declaration
protected override void OnPageAdded(PageEventArgs e)
Parameters
Type Name Description
Manina.Windows.Forms.PageEventArgs e
Overrides
Manina.Windows.Forms.PagedControl.OnPageAdded(Manina.Windows.Forms.PageEventArgs)
| Improve this Doc View Source

OnPageChanged(PageChangedEventArgs)

Declaration
protected override void OnPageChanged(PageChangedEventArgs e)
Parameters
Type Name Description
Manina.Windows.Forms.PageChangedEventArgs e
Overrides
Manina.Windows.Forms.PagedControl.OnPageChanged(Manina.Windows.Forms.PageChangedEventArgs)
| Improve this Doc View Source

OnPageRemoved(PageEventArgs)

Declaration
protected override void OnPageRemoved(PageEventArgs e)
Parameters
Type Name Description
Manina.Windows.Forms.PageEventArgs e
Overrides
Manina.Windows.Forms.PagedControl.OnPageRemoved(Manina.Windows.Forms.PageEventArgs)
| Improve this Doc View Source

OnPaint(PaintEventArgs)

Declaration
protected override void OnPaint(PaintEventArgs e)
Parameters
Type Name Description
System.Windows.Forms.PaintEventArgs e
Overrides
Manina.Windows.Forms.PagedControl.OnPaint(System.Windows.Forms.PaintEventArgs)
| Improve this Doc View Source

OnResize(EventArgs)

Declaration
protected override void OnResize(EventArgs e)
Parameters
Type Name Description
System.EventArgs e
Overrides
Manina.Windows.Forms.PagedControl.OnResize(System.EventArgs)
| Improve this Doc View Source

OnTabClick(TabMouseEventArgs)

Declaration
protected virtual void OnTabClick(TabMouseEventArgs e)
Parameters
Type Name Description
TabMouseEventArgs e
| Improve this Doc View Source

OnTabDoubleClick(TabMouseEventArgs)

Declaration
protected virtual void OnTabDoubleClick(TabMouseEventArgs e)
Parameters
Type Name Description
TabMouseEventArgs e
| Improve this Doc View Source

OnTabMouseDown(TabMouseEventArgs)

Declaration
protected virtual void OnTabMouseDown(TabMouseEventArgs e)
Parameters
Type Name Description
TabMouseEventArgs e
| Improve this Doc View Source

OnTabMouseMove(TabMouseEventArgs)

Declaration
protected virtual void OnTabMouseMove(TabMouseEventArgs e)
Parameters
Type Name Description
TabMouseEventArgs e
| Improve this Doc View Source

OnTabMouseUp(TabMouseEventArgs)

Declaration
protected virtual void OnTabMouseUp(TabMouseEventArgs e)
Parameters
Type Name Description
TabMouseEventArgs e
| Improve this Doc View Source

OnTabMouseWheel(TabMouseEventArgs)

Declaration
protected virtual void OnTabMouseWheel(TabMouseEventArgs e)
Parameters
Type Name Description
TabMouseEventArgs e
| Improve this Doc View Source

PerformHitTest(Point)

Performs a hit test with given coordinates and returns the tab which contains the given point.

Declaration
public TabControl.HitResult PerformHitTest(Point pt)
Parameters
Type Name Description
System.Drawing.Point pt

Hit test coordinates

Returns
Type Description
TabControl.HitResult

The tab which contains the given point; or null if none of the tabs contains the given point.

| Improve this Doc View Source

UpdateContentBounds(Tab, Rectangle)

Updates the bounding rectangles of tab contents.

Declaration
protected void UpdateContentBounds(Tab tab, Rectangle tabBounds)
Parameters
Type Name Description
Tab tab

The tab to update.

System.Drawing.Rectangle tabBounds

The bounding rectangle of the tab.

| Improve this Doc View Source

UpdateTabLayout()

Updates the layout of all tabs.

Declaration
protected void UpdateTabLayout()

Events

| Improve this Doc View Source

CloseTabButtonClick

Occurs when a close tab button is clicked.

Declaration
public event EventHandler<CancelTabEventArgs> CloseTabButtonClick
Event Type
Type Description
System.EventHandler<CancelTabEventArgs>
| Improve this Doc View Source

FarScrollButtonClick

Occurs when the far scroll button is clicked.

Declaration
public event EventHandler<EventArgs> FarScrollButtonClick
Event Type
Type Description
System.EventHandler<System.EventArgs>
| Improve this Doc View Source

LayoutTabs

Occurs when the layout of all interface elements are calculated.

Declaration
public event EventHandler<LayoutTabsEventArgs> LayoutTabs
Event Type
Type Description
System.EventHandler<LayoutTabsEventArgs>
| Improve this Doc View Source

MeasureScrollButton

Occurs when the size of the scroll buttons needs to be determined.

Declaration
public event EventHandler<MeasureEventArgs> MeasureScrollButton
Event Type
Type Description
System.EventHandler<MeasureEventArgs>
| Improve this Doc View Source

MeasureTab

Occurs when the size of a tab needs to be determined.

Declaration
public event EventHandler<MeasureTabEventArgs> MeasureTab
Event Type
Type Description
System.EventHandler<MeasureTabEventArgs>
| Improve this Doc View Source

NearScrollButtonClick

Occurs when the near scroll button is clicked.

Declaration
public event EventHandler<EventArgs> NearScrollButtonClick
Event Type
Type Description
System.EventHandler<System.EventArgs>
| Improve this Doc View Source

TabClick

Occurs when a tab is clicked.

Declaration
public event EventHandler<TabMouseEventArgs> TabClick
Event Type
Type Description
System.EventHandler<TabMouseEventArgs>
| Improve this Doc View Source

TabDoubleClick

Occurs when a tab is double clicked by the mouse.

Declaration
public event EventHandler<TabMouseEventArgs> TabDoubleClick
Event Type
Type Description
System.EventHandler<TabMouseEventArgs>
| Improve this Doc View Source

TabMouseDown

Occurs when the mouse pointer is over a tab and a mouse button is pressed.

Declaration
public event EventHandler<TabMouseEventArgs> TabMouseDown
Event Type
Type Description
System.EventHandler<TabMouseEventArgs>
| Improve this Doc View Source

TabMouseMove

Occurs when the mouse pointer is moved over a tab.

Declaration
public event EventHandler<TabMouseEventArgs> TabMouseMove
Event Type
Type Description
System.EventHandler<TabMouseEventArgs>
| Improve this Doc View Source

TabMouseUp

Occurs when the mouse pointer is over a tab and a mouse button is released.

Declaration
public event EventHandler<TabMouseEventArgs> TabMouseUp
Event Type
Type Description
System.EventHandler<TabMouseEventArgs>
| Improve this Doc View Source

TabMouseWheel

Occurs when the mouse pointer is over a tab and the mouse wheel is rotated.

Declaration
public event EventHandler<TabMouseEventArgs> TabMouseWheel
Event Type
Type Description
System.EventHandler<TabMouseEventArgs>
Back to top Copyright © 2018 Özgür Özçıtak