ListBox Get Item By Index


Node Information
Gets item in the specified ListBox with the specified index.
General Information
• This node doesn't have other available options.
Visual
Visual

Ports
Text Type DataType Accepts IsList CustomAcception
ListBox IN ListBox ONE FALSE FALSE
Index IN Int32 ONE FALSE FALSE
Item OUT Object MULTIPLE FALSE FALSE

Source
namespace Korduene.KGraph.Nodes.UI.ListBox
{
    [IsNode("Get Item By Index")]
    public class ListBoxAddGetItemByIndex : Node
    {
        Port index = new Port(PortType.IN, typeof(int), AcceptsLinks.ONE, "Index");
        Port control = new Port(PortType.IN, typeof(Korduene.Designer.Standard.ListBox), AcceptsLinks.ONE, "ListBox");
        Port item = new Port(PortType.OUT, typeof(object), AcceptsLinks.MULTIPLE, "Item");
        public ListBoxAddGetItemByIndex()
        {
            this.Name = "ListBox Get Item By Index";
            AddPort(control);
            AddPort(index);
            AddPort(item);
            Information = "Gets item in the specified ListBox with the specified index.";
        }
        public override void UpdateResults()
        {
            item.Instructions = GetValue(control) + ".Items[" + GetValue(index) + "]";
        }
    }
}