A collection of all the tab pages in the specified control. Each tab page is represented by a TabPage object.


Use the TabPages property to return a reference to the TabPages collection.


The following example creates a Form with a TabControl containing three TabPage controls. This example uses the Remove method to remove each tab from the collection.

Break On $System = CreateObject("Kixtart.System") $Form = $System.Form() $Form.ClientSize = 300, 300 $Form.TabControl1 = $Form.TabControl() $Form.TabControl1.Location = 25, 25 $Form.TabControl1.Size = 250, 200 ; Populates TabControl1 with three tab pages ... $Form.TabPage1 = $Form.TabControl1.TabPages.Add("TabPage1") $Form.TabPage2 = $Form.TabControl1.TabPages.Add("TabPage2") $Form.TabPage3 = $Form.TabControl1.TabPages.Add("TabPage3") $Form.Button1 = $Form.Button() $Form.Button1.Center $Form.Button1.Top = $Form.TabControl1.Bottom + 20 $Form.Button1.OnClick = "Click()" $Form.Button1.Text = "Remove Tab" $Form.Show While $Form.Visible $=Execute($Form.DoEvents) Loop Exit 1 Function Click() ; Get the TabControl TabPages collection ; and remove the first TabPage by index. If $Form.TabControl1.TabPages.Count $Form.TabControl1.TabPages.Remove(0) $= $System.MessageBox.Show("The are now " + $Form.TabControl1.TabPages.Count + " tab pages.") EndIf EndFunction

The CHM file was converted to HTML by chm2web software.