using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace TabForm { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { sftTabs1.MakeNaturalSize(); PopulateList(); } private void PopulateList() { listBox1.Items.Clear(); listBox1.Items.Add("Display all items starting with the letter " + sftTabs1.TabCollection[sftTabs1.Current].Text); for (int i = 1; i < 20; ++i) listBox1.Items.Add(sftTabs1.TabCollection[sftTabs1.Current].Text + " " + i.ToString()); } private void sftTabs1_Switched(object sender, EventArgs e) { PopulateList(); } private void button1_Click(object sender, EventArgs e) { Application.Exit(); } } }