PKStudio.Tree.InventoryTree.AddCheckBoxControl C# (CSharp) Метод

AddCheckBoxControl() публичный Метод

public AddCheckBoxControl ( string dataPropertyName ) : NodeCheckBox
dataPropertyName string
Результат NodeCheckBox
        public NodeCheckBox AddCheckBoxControl(string dataPropertyName)
        {
            checkControl = new NodeCheckBox();
            checkControl.LeftMargin = 0;
            checkControl.ParentColumn = null;
            checkControl.EditEnabled = true;
            AddNodeControl(dataPropertyName, checkControl);
            return checkControl;
        }

Usage Example

Пример #1
0
 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);
 }