ListView AutoResizeColumn


Node Information
Resizes the specified column in the ListView.
General Information
• This node doesn't have other available options.
Visual
Visual

Ports
Text Type DataType Accepts IsList CustomAcception
Remove IN RUN MULTIPLE FALSE FALSE
ListView IN ListView ONE FALSE FALSE
ColumnIndex IN Int32 ONE FALSE FALSE
ResizeStyle IN ColumnHeaderAutoResizeStyle ONE FALSE FALSE

Source
namespace Korduene.KGraph.Nodes.UI.ListView
{
    [IsNode("AutoResizeColumn")]
    public class ListViewAutoResizeColumn : Node
    {
        Port run = new Port(PortType.IN, typeof(RUN), AcceptsLinks.MULTIPLE, "Remove");
        Port colint = new Port(PortType.IN, typeof(int), AcceptsLinks.ONE, "ColumnIndex");
        Port resizestyle = new Port(PortType.IN, typeof(System.Windows.Forms.ColumnHeaderAutoResizeStyle), AcceptsLinks.ONE, "ResizeStyle");
        Port control = new Port(PortType.IN, typeof(Korduene.Designer.Standard.ListView), AcceptsLinks.ONE, "ListView");
        public System.Windows.Forms.ColumnHeaderAutoResizeStyle AutoResizeStyle
        {
            set { Settings[0] = value.ToString(); }
            get { return (System.Windows.Forms.ColumnHeaderAutoResizeStyle)Enum.Parse(typeof(System.Windows.Forms.ColumnHeaderAutoResizeStyle), Settings[0]); }
        }
        public int ColumnIndex
        {
            set { colint.Value = value.ToString(); }
            get { return GetRuntimeValue(colint); }
        }
        public ListViewAutoResizeColumn()
        {
            this.Name = "ListView AutoResizeColumn";
            this.NodeType = KGraph.NodeType.Method;
            resizestyle.DataType = typeof(System.Windows.Forms.ColumnHeaderAutoResizeStyle);
            AutoResizeStyle = System.Windows.Forms.ColumnHeaderAutoResizeStyle.None;
            AddPort(run);
            AddPort(control);
            AddPort(colint);
            AddPort(resizestyle);
            Information = "Resizes the specified column in the ListView.";
        }
        public override string Code()
        {
            return GetValue(control) + ".AutoResizeColumn(" + GetValue(colint) + "," + GetValue(resizestyle) + ");";
        }
    }
}