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
Assembly: TabControl.dll
[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
Initializes a new instance of the TabControl class.
Declaration
Properties
|
Improve this Doc
View Source
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
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
|
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
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
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
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
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
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
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
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
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
Gets or sets the renderer associated with the control.
Declaration
[Browsable(false)]
public TabControl.TabControlRenderer Renderer { get; set; }
Property Value
|
Improve this Doc
View Source
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
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
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
Gets or sets the current tab.
Declaration
public Tab SelectedTab { get; set; }
Property Value
|
Improve this Doc
View Source
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
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
Gets or sets the location of tabs.
Declaration
public TabLocation TabLocation { get; set; }
Property Value
|
Improve this Doc
View Source
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
Gets the collection of tabs.
Declaration
public TabControl.TabCollection Tabs { get; }
Property Value
|
Improve this Doc
View Source
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
Gets or sets the sizing mode of tabs.
Declaration
public TabSizing TabSizing { get; set; }
Property Value
|
Improve this Doc
View Source
TextDirection
Gets or sets the direction of tab texts.
Declaration
public TextDirection TextDirection { get; set; }
Property Value
|
Improve this Doc
View Source
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
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
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
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
Gets the visual state of the far scroll button.
Declaration
protected ItemState GetFarScrollButtonState()
Returns
|
Improve this Doc
View Source
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
Gets the visual state of the near scroll button.
Declaration
protected ItemState GetNearScrollButtonState()
Returns
|
Improve this Doc
View Source
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
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
|
Improve this Doc
View Source
Gets the visual state of a tab.
Declaration
protected ItemState GetTabState(Tab tab)
Parameters
Type |
Name |
Description |
Tab |
tab |
The tab to check.
|
Returns
|
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
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
Declaration
protected virtual void OnCloseTabButtonClick(CancelTabEventArgs e)
Parameters
|
Improve this Doc
View Source
Declaration
protected virtual void OnFarScrollButtonClick(EventArgs e)
Parameters
Type |
Name |
Description |
System.EventArgs |
e |
|
|
Improve this Doc
View Source
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
Declaration
protected virtual void OnLayoutTabs(LayoutTabsEventArgs e)
Parameters
|
Improve this Doc
View Source
Declaration
protected virtual void OnMeasureScrollButton(MeasureEventArgs e)
Parameters
|
Improve this Doc
View Source
Declaration
protected virtual void OnMeasureTab(MeasureTabEventArgs e)
Parameters
|
Improve this Doc
View Source
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
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
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
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
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
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
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
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
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
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
Declaration
protected virtual void OnTabClick(TabMouseEventArgs e)
Parameters
|
Improve this Doc
View Source
Declaration
protected virtual void OnTabDoubleClick(TabMouseEventArgs e)
Parameters
|
Improve this Doc
View Source
Declaration
protected virtual void OnTabMouseDown(TabMouseEventArgs e)
Parameters
|
Improve this Doc
View Source
Declaration
protected virtual void OnTabMouseMove(TabMouseEventArgs e)
Parameters
|
Improve this Doc
View Source
Declaration
protected virtual void OnTabMouseUp(TabMouseEventArgs e)
Parameters
|
Improve this Doc
View Source
Declaration
protected virtual void OnTabMouseWheel(TabMouseEventArgs e)
Parameters
|
Improve this Doc
View Source
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
Updates the layout of all tabs.
Declaration
protected void UpdateTabLayout()
Events
|
Improve this Doc
View Source
Occurs when a close tab button is clicked.
Declaration
public event EventHandler<CancelTabEventArgs> CloseTabButtonClick
Event Type
|
Improve this Doc
View Source
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
Occurs when the layout of all interface elements are calculated.
Declaration
public event EventHandler<LayoutTabsEventArgs> LayoutTabs
Event Type
|
Improve this Doc
View Source
Occurs when the size of the scroll buttons needs to be determined.
Declaration
public event EventHandler<MeasureEventArgs> MeasureScrollButton
Event Type
|
Improve this Doc
View Source
Occurs when the size of a tab needs to be determined.
Declaration
public event EventHandler<MeasureTabEventArgs> MeasureTab
Event Type
|
Improve this Doc
View Source
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
Occurs when a tab is clicked.
Declaration
public event EventHandler<TabMouseEventArgs> TabClick
Event Type
|
Improve this Doc
View Source
Occurs when a tab is double clicked by the mouse.
Declaration
public event EventHandler<TabMouseEventArgs> TabDoubleClick
Event Type
|
Improve this Doc
View Source
Occurs when the mouse pointer is over a tab and a mouse button is pressed.
Declaration
public event EventHandler<TabMouseEventArgs> TabMouseDown
Event Type
|
Improve this Doc
View Source
Occurs when the mouse pointer is moved over a tab.
Declaration
public event EventHandler<TabMouseEventArgs> TabMouseMove
Event Type
|
Improve this Doc
View Source
Occurs when the mouse pointer is over a tab and a mouse button is released.
Declaration
public event EventHandler<TabMouseEventArgs> TabMouseUp
Event Type
|
Improve this Doc
View Source
Occurs when the mouse pointer is over a tab and the mouse wheel is rotated.
Declaration
public event EventHandler<TabMouseEventArgs> TabMouseWheel
Event Type