PKStudio.Tree.InventoryTree.AddIconControl C# (CSharp) Method

AddIconControl() public method

public AddIconControl ( string dataPropertyName ) : NodeIcon
dataPropertyName string
return NodeIcon
        public NodeIcon AddIconControl(string dataPropertyName)
        {
            iconControl = new NodeIcon();
            iconControl.LeftMargin = 1;
            iconControl.ParentColumn = null;
            iconControl.ScaleMode = ImageScaleMode.Clip;
            AddNodeControl(dataPropertyName, iconControl);
            return iconControl;
        }

Usage Example

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);
 }