Class TabPageAdv
Represents a single tab page in a TabControlAdv.
Namespace: Syncfusion.Windows.Forms.Tools
Assembly: Syncfusion.Tools.Windows.dll
Syntax
public class TabPageAdv : Panel
Examples
The following example creates a TabControlAdv with one TabPageAdv object.
Use the Syncfusion.Windows.Forms.Tools namespace for this example.
public Form1()
{
this.tabControl1 = new TabControlAdv();
// Invokes the TabPage() constructor to create the tabPage1 object.
this.tabPage1 = new Syncfusion.Windows.Forms.Tools.TabPageAdv();
this.tabControl1.Controls.AddRange(new Control[] {
this.tabPage1});
this.tabControl1.Location = new Point(25, 25);
this.tabControl1.Size = new Size(250, 250);
this.ClientSize = new Size(300, 300);
this.Controls.AddRange(new Control[] {
this.tabControl1});
}
Public Sub New()
Me.tabControl1 = New TabControlAdv()
' Invokes the TabPage() constructor to create the tabPage1 object.
Me.tabPage1 = New Syncfusion.Windows.Forms.Tools.TabPageAdv()
Me.tabControl1.Controls.AddRange(New Control() {Me.tabPage1})
Me.tabControl1.Location = New Point(25, 25)
Me.tabControl1.Size = New Size(250, 250)
Me.ClientSize = New Size(300, 300)
Me.Controls.AddRange(New Control() {Me.tabControl1})
End Sub 'New
Constructors
TabPageAdv()
Creates a new instance of the TabPageAdv class.
Declaration
public TabPageAdv()
Examples
The following example creates a TabControlAdv with one TabPageAdv object. The constructor instantiates tabPage1.
Use the Syncfusion.Windows.Forms.Tools namespaces for this example.
public void MyTabs()
{
this.tabControl1 = new TabControlAdv();
// Invokes the TabPageAdv() constructor to create the tabPage1 object.
this.tabPage1 = new Syncfusion.Windows.Forms.ToolsTabPageAdv();
this.tabControl1.Controls.Add(tabPage1);
this.Controls.Add(tabControl1);
}
public Form1()
{
MyTabs();
}
TabPageAdv(ITabData, ITabPanelDefaultProperties)
Creates a new instance of the TabPageAdv class with its tab data and default properties.
Declaration
public TabPageAdv(ITabData tabData, ITabPanelDefaultProperties tabPanelDefaultProperties)
Parameters
Type | Name | Description |
---|---|---|
ITabData | tabData | The data for this tab. |
ITabPanelDefaultProperties | tabPanelDefaultProperties | The default properties for this tab. |
TabPageAdv(String)
Creates a new instance of the TabPageAdv class qith the specified text for the tab.
Declaration
public TabPageAdv(string label)
Parameters
Type | Name | Description |
---|---|---|
System.String | label | The text for the tab. |
Examples
This example creates a TabControlAdv with a TabPageAdv object. The constructor accepts the myTabPage string as Text for tabPage1.
Use the Syncfusion.Windows.Forms.Tools namespaces for this example.
public void MyTabs()
{
this.tabControl1 = new TabControlAdv();
string tabPageName = "myTabPage";
// Invokes the TabPageAdv() constructor to create the tabPage1 object.
this.tabPage1 = new Syncfusion.Windows.Forms.Tools.TabPageAdv(tabPageName);
this.tabControl1.Controls.Add(tabPage1);
this.Controls.Add(tabControl1);
}
public Form1()
{
MyTabs();
}
Properties
Anchor
Overridden. See System.Windows.Forms.Control.Anchor.
Declaration
public override AnchorStyles Anchor { get; set; }
Property Value
Type |
---|
System.Windows.Forms.AnchorStyles |
Remarks
Anchoring TabPageAdv instance is disabled.
Dock
Gets or sets which control borders are docked to its parent control and determines how a control is resized with its parent.
Overridden. See System.Windows.Forms.Control.Dock.
Declaration
public override DockStyle Dock { get; set; }
Property Value
Type |
---|
System.Windows.Forms.DockStyle |
Remarks
Docking TabPageAdv instance is disabled.
Enabled
Gets or sets a value indicating whether the control can respond to user interaction.
Overridden. See System.Windows.Forms.Control.Enabled.
Declaration
public bool Enabled { get; set; }
Property Value
Type |
---|
System.Boolean |
Image
Gets or sets the image.
Declaration
public Image Image { get; set; }
Property Value
Type | Description |
---|---|
System.Drawing.Image | The image. |
ImageIndex
Gets / sets the index to the image displayed on this tab.
Declaration
public virtual int ImageIndex { get; set; }
Property Value
Type |
---|
System.Int32 |
Remarks
The zero-based index to the image in the TabControlAdv.ImageList that appears on the tab. The default is -1, which signifies no image.
The ImageIndex points to an image in the TabControlAdv object's associated ImageList.
ImageSize
Gets or sets the size of the image.
Declaration
public Size ImageSize { get; set; }
Property Value
Type | Description |
---|---|
System.Drawing.Size | The size of the image. |
IsTransparent
Indicates whether this control is transparent.
Declaration
public bool IsTransparent { get; set; }
Property Value
Type |
---|
System.Boolean |
ScrollerFrame
Gets the ScrollerFrame for TabPageAdv.
Declaration
public ScrollersFrame ScrollerFrame { get; }
Property Value
Type |
---|
ScrollersFrame |
ShowCloseButton
Declaration
public bool ShowCloseButton { get; set; }
Property Value
Type |
---|
System.Boolean |
Site
Gets or sets the site of the control.
Declaration
public override ISite Site { get; set; }
Property Value
Type |
---|
System.ComponentModel.ISite |
SuperTooltip
Gets or sets the SuperToolTip information for this tab.
Declaration
public ToolTipInfo SuperTooltip { get; set; }
Property Value
Type |
---|
ToolTipInfo |
TabBackColor
Gets / sets the background color of this tab. Will override the Active Tab and Inactive Tab Colors.
Declaration
public virtual Color TabBackColor { get; set; }
Property Value
Type |
---|
System.Drawing.Color |
Remarks
This tab page belongs to a TabControlAdv instance. The color specified here will be used when rendering the associated tab in the TabControlAdv.
TabEnabled
Indicates whether to enable the tab.
Declaration
public virtual bool TabEnabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | True to enable; false otherwise. |
Remarks
If disabled, the tab will be drawn disabled and the user will not be able to select the tab page through the mouse or keyboard. You can however select a tab programmatically using the SelectedIndex or SelectedTab property.
TabFont
Gets / sets the font used to display text in the tab.
Declaration
public virtual Font TabFont { get; set; }
Property Value
Type | Description |
---|---|
System.Drawing.Font | The Font object. |
Remarks
This tab page belongs to a TabControlAdv instance. The Font specified here will be used when rendering the associated tab in the TabControlAdv.
TabForeColor
Gets / sets the forecolor of this tab. Default is SystemColors.WindowText.
Declaration
public virtual Color TabForeColor { get; set; }
Property Value
Type |
---|
System.Drawing.Color |
Remarks
This tab page belongs to a TabControlAdv instance. The color specified here will be used when rendering the associated tab in the TabControlAdv. The setting will not affect the Controls in the tab page.
TabIndex
Gets or sets the tab order of the control within its container. Overridden. See System.Windows.Forms.Control.TabIndex.
Declaration
public int TabIndex { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The index value of the control within the set of controls within its container. The controls in the container are included in the tab order. |
Remarks
TabIndex property for the TabPageAdv instance is disabled.
TabStop
Gets or sets a value indicating whether the user can give the focus to this control using the TAB key. Overridden. See System.Windows.Forms.Control.TabStop.
Declaration
public bool TabStop { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the user can give the focus to the control using the TAB key; otherwise,false. The default is true.NoteThis property will always return true for an instance of the System.Windows.Forms.Form class. |
Remarks
TabStop property for the TabPageAdv instance is disabled.
TabVisible
Indicates whether to show a particular tab.
Declaration
public virtual bool TabVisible { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | True to show the tab; false otherwise. |
Remarks
When the tab is made invisible, you can still show the tab page by setting the appropriate SelectedIndex programmatically.
In fact, you can hide all the tabs and operate the tab like a Wizard. But also note that Essential Tools provides a separate WizardControl for that purpose.
Text
Overridden. Gets / sets the text to display on the tab.
Declaration
public override string Text { get; set; }
Property Value
Type | Description |
---|---|
System.String | The text to display on the tab. |
ThemesEnabled
Indicates whether or not themes should be used to draw this tab page.
Declaration
public bool ThemesEnabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | True if enabled; false otherwise. |
Remarks
By default, the value for this property is inherited from the parent TabControlAdv. You can explicitly set it to false if you want to turn off themed drawing of the background of this tab page.
ToolTipText
Gets / sets the ToolTip text for this tab.
Declaration
public string ToolTipText { get; set; }
Property Value
Type | Description |
---|---|
System.String | The ToolTip text for this tab. |
Remarks
This tab page belongs to a TabControlAdv instance. The ToolTip text appears when the user moves the mouse over the tab - if the ShowToolTips property of the TabControlAdv is true. For more information on ToolTips, see the System.Windows.Forms.ToolTip class.
UseActiveTabColor
enables to set the tab back color as active tab color
Declaration
public bool UseActiveTabColor { get; set; }
Property Value
Type |
---|
System.Boolean |
UseCustomScrollerFrame
Gets or Sets whether to have custom scrollbar
Declaration
public bool UseCustomScrollerFrame { get; set; }
Property Value
Type |
---|
System.Boolean |
Visible
Gets or sets a value indicating whether the control and all its child controls are displayed. Overridden. See System.Windows.Forms.Control.Visible.
Declaration
public bool Visible { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the control and all its child controls are displayed; otherwise, false. The default is true. |
Remarks
Visible property for the TabPageAdv instance is disabled.
Methods
Close()
Closes System.Windows.Forms.TabPage.
Declaration
public bool Close()
Returns
Type | Description |
---|---|
System.Boolean | False if page can't be closed. This happens if closing is canceled in Closing event handler, page is disposed/being disposed, page is detached from TabControlAdv, or hosted in any other (non-TabControlAdv) control. In last case, page is just removed from parent's System.Windows.Forms.Control.Controls collection. |
Remarks
Removes page from TabPages collection. That also removes page from parent TabControlAdv System.Windows.Forms.Control.Controls collection.
This method is called by TabControlAdv only when user clicks tab page's or tab control's close button.
CreateAccessibilityInstance()
Declaration
protected override AccessibleObject CreateAccessibilityInstance()
Returns
Type |
---|
System.Windows.Forms.AccessibleObject |
CreateControlsInstance()
Overridden. See System.Windows.Forms.Control.CreateControlsInstance.
Declaration
protected override Control.ControlCollection CreateControlsInstance()
Returns
Type |
---|
System.Windows.Forms.Control.ControlCollection |
CreateDefaultTabData()
Called to create the default ITabData for this TabPageAdv.
Declaration
protected virtual ITabData CreateDefaultTabData()
Returns
Type | Description |
---|---|
ITabData | An ITabData instance. |
Dispose(Boolean)
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing |
GetTabPageAdvOfComponent(Object)
Gets the control of the TabPageAdv.
Declaration
public static TabPageAdv GetTabPageAdvOfComponent(object comp)
Parameters
Type | Name | Description |
---|---|---|
System.Object | comp | The component |
Returns
Type | Description |
---|---|
TabPageAdv | The parent of the TabPageAdv. |
Hide()
Hide the tab page from the user.
Declaration
public void Hide()
OnEnter(EventArgs)
Raises the Enter event.
Declaration
protected override void OnEnter(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | The System.EventArgs that has some information regarding this event. |
OnLeave(EventArgs)
Raises the Leave event.
Declaration
protected override void OnLeave(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | The System.EventArgs that has some information regarding this event. |
OnPaintBackground(PaintEventArgs)
Declaration
protected override void OnPaintBackground(PaintEventArgs pevent)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.PaintEventArgs | pevent |
ResetTabBackColor()
Resets the TabBackColor property to its default value.
Declaration
public virtual void ResetTabBackColor()
Remarks
You typically use this method if you are either creating a designer for the Control or creating your own control incorporating this Control.
ResetTabFont()
Resets the TabFont property to its default value.
Declaration
public virtual void ResetTabFont()
Remarks
You typically use this method if you are either creating a designer for the Control or creating your own control incorporating this Control.
ResetTabForeColor()
Resets the TabForeColor property to its default value.
Declaration
public virtual void ResetTabForeColor()
Remarks
You typically use this method if you are either creating a designer for the Control or creating your own control incorporating this Control.
ResetThemesEnabled()
Declaration
protected void ResetThemesEnabled()
SetBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified)
Overridden. See System.Windows.Forms.Control.SetBoundsCore(System.Int32,System.Int32,System.Int32,System.Int32,System.Windows.Forms.BoundsSpecified).
Declaration
protected override void SetBoundsCore(int x, int y, int width, int height, BoundsSpecified specified)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | x | |
System.Int32 | y | |
System.Int32 | width | |
System.Int32 | height | |
System.Windows.Forms.BoundsSpecified | specified |
SetSelectedAtDesignTime()
Declaration
protected void SetSelectedAtDesignTime()
ShouldSerializerThemesEnabled()
Declaration
protected bool ShouldSerializerThemesEnabled()
Returns
Type |
---|
System.Boolean |
ShouldSerializeTabBackColor()
Indicates whether the current value of the TabBackColor property is to be serialized.
Declaration
protected virtual bool ShouldSerializeTabBackColor()
Returns
Type |
---|
System.Boolean |
Remarks
You typically use this method if you are either creating a designer for the Control or creating your own control incorporating this Control.
ShouldSerializeTabFont()
Indicates whether the current value of the TabFont property is to be serialized.
Declaration
protected virtual bool ShouldSerializeTabFont()
Returns
Type |
---|
System.Boolean |
Remarks
You typically use this method if you are either creating a designer for the Control or creating your own control incorporating this Control.
ShouldSerializeTabForeColor()
Indicates whether the current value of the TabForeColor property is to be serialized.
Declaration
protected virtual bool ShouldSerializeTabForeColor()
Returns
Type |
---|
System.Boolean |
Remarks
You typically use this method if you are either creating a designer for the Control or creating your own control incorporating this Control.
Show()
Displays the tab page to the user.
Declaration
public void Show()
ToString()
Returns a System.String containing the name of the System.ComponentModel.Component, if any. This method should not be overridden. Overridden. See System.Object.ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A System.String containing the name of the System.ComponentModel.Component, if any, or null if the System.ComponentModel.Component is unnamed. |
Remarks
A string representation
WndProc(ref Message)
Declaration
protected override void WndProc(ref Message m)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.Message | m |
Events
Closed
Occurs when the tab page is closed.
Declaration
public event EventHandler Closed
Event Type
Type |
---|
System.EventHandler |
Remarks
This event is not fired when tab page is disposed or being disposed.
Closing
Occurs when the tab page is closing.
Declaration
public event TabPageAdvClosingEventHandler Closing
Event Type
Type |
---|
TabPageAdvClosingEventHandler |
Remarks
This event is not fired when tab page is disposed or being disposed.