The control is automatically added to your Toolbox in Visual Studio and is automatically registered in the GAC (Global Assembly Cache) during installation of SftTabs/NET. Please see Distributing SftTabs/NET for information on how to distribute the control with your application.
.NET 10 projects use the control through its NuGet package, see Using SftTabs/NET with .NET 10.
You can add a SftTabs control to a form by dragging it from the Toolbox to the form.
If the control is missing from the Toolbox, please see "Manually Adding .NET Components To The Toolbox".
Once the control has been added to the form, you can add and remove tabs and access its property pages, product updates and product support page on the web using the control's smart tag (SftTabs Tasks). Add Tab adds a tab with a new page and Remove Tab removes the selected tab and its page. Edit Properties opens the property pages.
Each tab has a page. Drag controls from the Toolbox onto the page of the selected tab. Once the tab control is selected, clicking a tab selects the tab and shows its page.
In this example, we'll add a few tabs in code and place a control on one of the tab pages.
VB
Imports Softelvdm.SftTabsNET
Imports Softelvdm.SftTabsNET.Controls
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim tab As TabClass
tab = SftTabs1.Tabs.Add("&General")
tab.Page.Controls.Add(New Label() With {.Text = "General settings", .AutoSize = True, .Location = New Point(12, 12)})
SftTabs1.Tabs.Add("&Appearance")
SftTabs1.Tabs.Add("&Network")
End Sub
Private Sub SftTabs1_Switched(ByVal sender As System.Object, ByVal e As TabSwitchedEventArgs) Handles SftTabs1.Switched
Text = e.Tab.Text
End Sub
End ClassC#
using System;
using System.Drawing;
using System.Windows.Forms;
using Softelvdm.SftTabsNET;
using Softelvdm.SftTabsNET.Controls;
namespace WindowsApplication1 {
public partial class Form1 : Form {
public Form1() {
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e) {
TabClass tab = sftTabs1.Tabs.Add("&General");
tab.Page.Controls.Add(new Label() { Text = "General settings", AutoSize = true, Location = new Point(12, 12) });
sftTabs1.Tabs.Add("&Appearance");
sftTabs1.Tabs.Add("&Network");
sftTabs1.Switched += sftTabs1_Switched;
}
private void sftTabs1_Switched(object sender, TabSwitchedEventArgs e) {
Text = e.Tab.Text;
}
}
}This control has many properties and methods which you can use. This is a very simple example and doesn't even begin to exploit the capabilities of this control. Please take a moment to familiarize yourself with the classes and objects offered by the SftTabs/NET control. Each class or object represents a specific area of the control and can be fully customized. Also make sure to run the demo which is included with this product and take a look at the included samples.