protected void SetupTree(InventoryTree tree, ITreeModel model, bool expandRoot)
{
tree.NodeControls.Clear();
NodeCheckBox checkBox = tree.AddCheckBoxControl("Checked");
checkBox.IsVisibleValueNeeded += new EventHandler<NodeControlValueEventArgs>(IsCheckBoxVisible);
checkBox.IsEditEnabledValueNeeded += new EventHandler<NodeControlValueEventArgs>(IsCheckBoxEnabled);
checkBox.CheckStateChanged += new EventHandler<TreePathEventArgs>(CheckBoxStateChanged);
tree.AddIconControl("Icon");
tree.AddTextBoxControl("Name");
tree.SetModel(model, expandRoot);
}