Class MDITabPanel
The tab control used to render a tab group in a tabbed MDI UI managed by the TabbedMDIManager.
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Tools
Assembly: Syncfusion.Tools.Windows.dll
Syntax
public class MDITabPanel : TabControlAdv, IThemeProvider, IVisualStyle, IDisposable, ITabControl, ISupportInitialize, ISupportOffice2007Theme, ITabbedMDIBarItemEvents
Remarks
To access this tab control, override CreateMDITabPanel() (you can provide a custom derived class, if necessary) and/or InitMDITabPanel(MDITabPanel).
Constructors
MDITabPanel(TabbedMDIManager)
Creates a new instance of the MDITabPanel class.
Declaration
public MDITabPanel(TabbedMDIManager manager)
Parameters
Type | Name | Description |
---|---|---|
TabbedMDIManager | manager | The corresponding TabbedMDIManager instance. |
Fields
CLOSE_BUTTON_AREA_HEIGHT
Declaration
public const int CLOSE_BUTTON_AREA_HEIGHT = 16
Field Value
Type |
---|
System.Int32 |
CLOSE_BUTTON_AREA_WIDTH
Declaration
public const int CLOSE_BUTTON_AREA_WIDTH = 20
Field Value
Type |
---|
System.Int32 |
Properties
ActiveTabFont
Declaration
public override Font ActiveTabFont { get; set; }
Property Value
Type |
---|
System.Drawing.Font |
Overrides
CloseButtonClicked
Declaration
protected virtual bool CloseButtonClicked { get; set; }
Property Value
Type |
---|
System.Boolean |
CloseButtonHit
Declaration
protected virtual bool CloseButtonHit { get; set; }
Property Value
Type |
---|
System.Boolean |
DropDownButton
Gets drop down button control.
Declaration
public MdiDropDownButton DropDownButton { get; }
Property Value
Type |
---|
MdiDropDownButton |
Font
Overrides the font. See System.Windows.Forms.Control.Font.
Declaration
public override Font Font { get; set; }
Property Value
Type |
---|
System.Drawing.Font |
Overrides
IsVerticalAlignment
Gets a value indicating whether the tabAlignment is set to right or left.
Declaration
public bool IsVerticalAlignment { get; }
Property Value
Type |
---|
System.Boolean |
ShowCloseButton
Gets or sets if button for each Tab is shown.
Declaration
[Obsolete("Please, use ShowTabCloseButton property instead.")]
public bool ShowCloseButton { get; set; }
Property Value
Type |
---|
System.Boolean |
Methods
AddMdiChild(Form, MDIChildTabData)
Adds an mdi child Form to this tab control (tab group).
Declaration
protected virtual void AddMdiChild(Form mdiChild, MDIChildTabData prevTabData)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.Form | mdiChild | The Form to add. |
MDIChildTabData | prevTabData | Settings for the tab. |
Remarks
This method will be called to add an mdi child Form to the tab group represented by this tab control.
To access or provide a custom tab page, override the CreateTab(MDIChildTabData, ITabPanelDefaultProperties) method.
AdjustScrollButtonDimensions(ref RectangleF, Boolean)
Declaration
protected override void AdjustScrollButtonDimensions(ref RectangleF tabPanelBounds, bool scrollNeeded)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.RectangleF | tabPanelBounds | |
System.Boolean | scrollNeeded |
Overrides
AdjustTabPanelBounds(RectangleF)
Declaration
protected override RectangleF AdjustTabPanelBounds(RectangleF tabPanelBounds)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.RectangleF | tabPanelBounds |
Returns
Type |
---|
System.Drawing.RectangleF |
Overrides
CreateTab(MDIChildTabData, ITabPanelDefaultProperties)
Creates a new tab in the tab group.
Declaration
protected virtual TabPageAdv CreateTab(MDIChildTabData tabData, ITabPanelDefaultProperties defaultProps)
Parameters
Type | Name | Description |
---|---|---|
MDIChildTabData | tabData | The data for this tab. |
ITabPanelDefaultProperties | defaultProps | Default properties of this tab. |
Returns
Type | Description |
---|---|
TabPageAdv | A TabPageAdv instance. |
DetachMdiChildren()
Declaration
protected virtual void DetachMdiChildren()
Dispose(Boolean)
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
Overrides
DrawPanelBackground(Graphics)
Declaration
protected override void DrawPanelBackground(Graphics g)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | g |
Overrides
ForceLayout()
Declaration
public void ForceLayout()
GetCloseButtonBounds()
Declaration
protected virtual Rectangle GetCloseButtonBounds()
Returns
Type |
---|
System.Drawing.Rectangle |
GetSelectedForm()
Returns the selected mdi child Form in this tab group.
Declaration
public Form GetSelectedForm()
Returns
Type | Description |
---|---|
System.Windows.Forms.Form | A child System.Windows.Forms.Form instance. |
GetTabPageAdvFromForm(Form)
Returns the TabPageAdv of a given mdi child Form.
Declaration
public TabPageAdv GetTabPageAdvFromForm(Form mdiChild)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.Form | mdiChild | The mdi child Form. |
Returns
Type | Description |
---|---|
TabPageAdv | The TabPageAdv instance associated with this Form. Can be null. |
IsCloseButtonActive()
Declaration
public bool IsCloseButtonActive()
Returns
Type |
---|
System.Boolean |
IsHosting(Form)
Indicates whether an mdi child Form is "hosted" within this tab control.
Declaration
public bool IsHosting(Form mdiChild)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.Form | mdiChild | An mdi child Form. |
Returns
Type | Description |
---|---|
System.Boolean | True if the Form is part of this tab control; false otherwise. |
Layout(Graphics, Boolean)
Declaration
protected override void Layout(Graphics g, bool fromPaint)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | g | |
System.Boolean | fromPaint |
Overrides
OnDragLeave(EventArgs)
Declaration
protected override void OnDragLeave(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e |
OnDragOver(DragEventArgs)
Declaration
protected override void OnDragOver(DragEventArgs drgevent)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.DragEventArgs | drgevent |
OnMouseDown(MouseEventArgs)
Overridden. See System.Windows.Forms.Control.OnMouseDown(System.Windows.Forms.MouseEventArgs).
Declaration
protected override void OnMouseDown(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.MouseEventArgs | e | MouseEventArgs that contains the event data. |
Overrides
OnMouseLeave(EventArgs)
Overridden. See System.Windows.Forms.Control.OnMouseLeave(System.EventArgs).
Declaration
protected override void OnMouseLeave(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | EventArgs that contains the event data. |
Overrides
OnMouseMove(MouseEventArgs)
Overridden. See System.Windows.Forms.Control.OnMouseMove(System.Windows.Forms.MouseEventArgs).
Declaration
protected override void OnMouseMove(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.MouseEventArgs | e | MouseEventArgs that contains the event data. |
Overrides
OnMouseUp(MouseEventArgs)
Overridden. See System.Windows.Forms.Control.OnMouseUp(System.Windows.Forms.MouseEventArgs).
Declaration
protected override void OnMouseUp(MouseEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.MouseEventArgs | e | MouseEventArgs that contains the event data. |
Overrides
OnPaint(PaintEventArgs)
Overridden. See System.Windows.Forms.Control.OnPaint(System.Windows.Forms.PaintEventArgs).
Declaration
protected override void OnPaint(PaintEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.PaintEventArgs | e | PaintEventArgs that contains the event data. |
Overrides
OnRightToLeftChanged(EventArgs)
Declaration
protected override void OnRightToLeftChanged(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e |
Overrides
OnSelectedIndexChanged(EventArgs)
Overridden. See OnSelectedIndexChanged(EventArgs).
Declaration
protected override void OnSelectedIndexChanged(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | EventArgs that contains event data. |
Overrides
PaintCloseButton(PaintEventArgs, Color)
Declaration
protected virtual void PaintCloseButton(PaintEventArgs e, Color buttonColor)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.PaintEventArgs | e | |
System.Drawing.Color | buttonColor |
RemoveMdiChild(Form, Boolean)
Removes the tab page corresponding to the mdi child Form.
Declaration
protected virtual bool RemoveMdiChild(Form mdiChild, bool pRemoveFromHashtable)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.Form | mdiChild | The mdi child Form. |
System.Boolean | pRemoveFromHashtable |
Returns
Type | Description |
---|---|
System.Boolean | True if successfully removed; false otherwise. |
RendererChanged(TabPanelRenderer)
Declaration
protected override void RendererChanged(TabPanelRenderer rendererNew)
Parameters
Type | Name | Description |
---|---|---|
TabPanelRenderer | rendererNew |
Overrides
ResumeChildActivation()
Declaration
protected virtual void ResumeChildActivation()
SetRegion()
Declaration
protected override void SetRegion()
Overrides
SuspendChildActivation()
Declaration
protected virtual void SuspendChildActivation()
UpdateCloseAndDropDownButtons()
Update close and drop down buttons.
Declaration
public void UpdateCloseAndDropDownButtons()
ValidateFocusedTab()
Declaration
public override bool ValidateFocusedTab()
Returns
Type |
---|
System.Boolean |
Overrides
Explicit Interface Implementations
ITabbedMDIBarItemEvents.OnClick(Object)
Declaration
void ITabbedMDIBarItemEvents.OnClick(object sender)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender |