In some instances, you may want to add a C1Tabs control to your project in code. In this topic, you will learn how to create a C1Tabs control with three C1TabPage objects using C# and Visual Basic code.
Complete the following steps:
To write code in Visual Basic
| Visual Basic |
Copy Code
|
|---|---|
Imports C1.Web.Wijmo.Controls.C1Tabs |
|
To write code in C#
| C# |
Copy Code
|
|---|---|
using C1.Web.Wijmo.Controls.C1Tabs; |
|
To write code in Visual Basic
| Visual Basic |
Copy Code
|
|---|---|
Dim NewTabs As C1Tabs = New C1Tabs() NewTabs.Width = 300 NewTabs.Height = 200 PlaceHolder1.Controls.Add(NewTabs) |
|
To write code in C#
| C# |
Copy Code
|
|---|---|
C1Tabs NewTabs = new C1Tabs(); NewTabs.Width = 300; NewTabs.Height = 200; PlaceHolder1.Controls.Add(NewTabs); |
|
To write code in Visual Basic
| Visual Basic |
Copy Code
|
|---|---|
'Create three C1TabPage objects Dim C1TabPage1 As C1TabPage = New C1TabPage() Dim C1TabPage2 As C1TabPage = New C1TabPage() Dim C1TabPage3 As C1TabPage = New C1TabPage() 'Set the TabPages' 'Text' Property C1TabPage1.Text = "C1TabPage1" C1TabPage2.Text = "C1TabPage2" C1TabPage3.Text = "C1TabPage3" 'Add the three C1TabPage objects to the C1Tabs NewTabs.Controls.Add(C1TabPage1) NewTabs.Controls.Add(C1TabPage2) NewTabs.Controls.Add(C1TabPage3) |
|
To write code in C#
| C# |
Copy Code
|
|---|---|
//Create three C1TabPage objects C1TabPage C1TabPage1 = new C1TabPage(); C1TabPage C1TabPage2 = new C1TabPage(); C1TabPage C1TabPage3 = new C1TabPage(); //Set the TabPages' 'Text' Property' C1TabPage1.Text = "C1TabPage1"; C1TabPage2.Text = "C1TabPage2"; C1TabPage3.Text = "C1TabPage3"; //Add the three C1Tab objects to the C1Tabs NewTabs.Controls.Add(C1TabPage1); NewTabs.Controls.Add(C1TabPage2); NewTabs.Controls.Add(C1TabPage3); |
|
This Topic Illustrates the Following:
When your project is run, your C1Tabs control will resemble the following image:
