Here is a sample script that Shawn wrote that demos the new TabControl.

What is cool about this is that you can "reuse" variable names in this context without destroying the object. The magic is that each TabPage is indexed under the TabControl.



Break On

$Form = CreateObject("Kixtart.Form")
$Form.FormBorderStyle = 4
$Form.ClientSize = 500,300

$TabControl = $Form.Controls.TabControl
$TabControl.Size = $Form.ClientSize
$TabControl.Anchor = 15
$TabControl.OnSelectedIndexChanged = "OnTabControlSelectedIndexChanged()"

For $i = 0 to 20
 $TabPage = $TabControl.TabPages.Add($i)
 $ListView = $TabPage.Controls.ListView
 $ListView.Size = $TabPage.ClientSize
 $ListView.Anchor = 15
 $ListView.GridLines = 1
 $ListView.Columns.Count = 10
 For $j = 0 to 10
  $Item = $ListView.Items.Add($j)
  For $k = 0 To $ListView.Columns.Count - 1
   $Item.SubItems($k).Text = $k
  Next
 Next

 $ListView.Name = "ListView"
 $ListView.Tag = "This is listview #$i"

Next

$Form.Show
While $Form.Visible
 $=Execute($Form.DoEvents)
Loop

Exit 1

Function OnTabControlSelectedIndexChanged()

 If $TabControl.SelectedIndex <> -1

  $ListView = $TabControl.TabPages($TabControl.SelectedIndex).Controls("ListView")

  $Form.Text = $ListView.Tag

 EndIf
EndFunction