ListView EnsureVisible


Node Information
Ensures the item with the specified index is visible in the specified ListView.
General Information
• This node doesn't have other available options.
Visual
Visual

Ports
Text Type DataType Accepts IsList CustomAcception
Add IN RUN MULTIPLE FALSE FALSE
ListView IN ListView ONE FALSE FALSE
Index IN Int32 ONE FALSE FALSE

Source
namespace Korduene.KGraph.Nodes.UI.ListView
{
    [IsNode("Ensure Visible")]
    public class ListViewEnsureVisible : Node
    {
        Port run = new Port(PortType.IN, typeof(RUN), AcceptsLinks.MULTIPLE, "Add");
        Port itemIndex = new Port(PortType.IN, typeof(int), AcceptsLinks.ONE, "Index");
        Port control = new Port(PortType.IN, typeof(Korduene.Designer.Standard.ListView), AcceptsLinks.ONE, "ListView");
        public int ItemIndex
        {
            set { itemIndex.Value = value.ToString(); }
            get { return GetRuntimeValue(itemIndex); }
        }
        public ListViewEnsureVisible()
        {
            this.Name = "ListView EnsureVisible";
            this.NodeType = KGraph.NodeType.Method;
            AddPort(run);
            AddPort(control);
            AddPort(itemIndex);
            Information = "Ensures the item with the specified index is visible in the specified ListView.";
        }
        public override string Code()
        {
            return GetValue(control) + ".EnsureVisible(" + GetValue(itemIndex) + ");";
        }
    }
}