ListView AutoResizeColumns


Node Information
Resizes the columns 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
ResizeStyle IN ColumnHeaderAutoResizeStyle ONE FALSE FALSE

Source
namespace Korduene.KGraph.Nodes.UI.ListView
{
    [IsNode("AutoResizeColumns")]
    public class ListViewAutoResizeColumns : Node
    {
        Port run = new Port(PortType.IN, typeof(RUN), AcceptsLinks.MULTIPLE, "Remove");
        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 ListViewAutoResizeColumns()
        {
            this.Name = "ListView AutoResizeColumns";
            this.NodeType = KGraph.NodeType.Method;
            resizestyle.DataType = typeof(System.Windows.Forms.ColumnHeaderAutoResizeStyle);
            AutoResizeStyle = System.Windows.Forms.ColumnHeaderAutoResizeStyle.None;
            AddPort(run);
            AddPort(control);
            AddPort(resizestyle);
            Information = "Resizes the columns in the ListView.";
        }
        public override string Code()
        {
            return GetValue(control) + ".AutoResizeColumns(" + GetValue(resizestyle) + ");";
        }
    }
}