Exemple #1
0
        private void buttonAddRoot_Click(object sender, EventArgs e)
        {
            TListViewItem root = new TListViewItem(this.textBoxValue.Text);

            _listViewControler.AddRoot(root);
            root.EnsureVisible();
        }
Exemple #2
0
        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();
                }
            }
        }