Overview
Previous  Next

TabControl can be used to fit more controls on the small screen area.
After creating the TabControl you can add existing controls to it using AddControl method.
The controls added would be removed from the form and will be added to the TabControl.

Example: (The use of AddButton and AddTextbox is not mandatory, it could be done using the Visual Designer also).

'Add a TabControl object named tbc.
Sub Globals

End Sub

Sub App_Start
      Form1.Show
      AddButton(Form1,"Button1",0,0,80,40,"Button1")
      AddTextBox (Form1,"TextBox1",40,20,100,25,"")
      tbc.New1 ("Form1", 10,10, 200, 200)
      tbc.AddTabPage("Page1")
      tbc.AddTabPage("Page2")
      tbc.AddTabPage("Page3")
      tbc.AddControl("Button1",0,20,20)
      tbc.AddControl("TextBox1",1,20,30)
End Sub

Sub tbc_SelectionChanged
      msgbox("Selected page: " & tbc.SelectedIndex)
End Sub