private void buttonAddRoot_Click(object sender, EventArgs e) { TListViewItem root = new TListViewItem(this.textBoxValue.Text); _listViewControler.AddRoot(root); root.EnsureVisible(); }
private void buttonAddChild_Click(object sender, EventArgs e) { TListViewItem item = _listViewControler.SelectedItem; if (item != null) { TListViewItem child = new TListViewItem(this.textBoxValue.Text); _listViewControler.AddChild(item, child); if (this.checkBoxAutoExpand.Checked) { item.Expand(); child.EnsureVisible(); } } }