Tinkr2/4.2/AphelionCore/AphelionCommonControls/Controls/Combobox.cs
/// <summary>
/// Adds a item to the combo box
/// </summary>
/// <param name="item">Item to add</param>
Adds a item to the combo box
Adds a item to the combo box
public void AddItem(ListboxItem item)
      {
         if (_items == null)
         {
            _items = new[] { item };
         }
         else
         {
            var tmp = new ListboxItem[_items.Length + 1];
            Array.Copy(_items, tmp, _items.Length);
            tmp[tmp.Length - 1] = item;
            _items = tmp;
         }
         if (_selIndex == -1)
         {
            _selIndex = 0;
            Invalidate();
         }
      }
public void AddItem ( ListboxItem item ) { if ( _items == null ) { _items = new [ ] { item } ; } else { var tmp = new ListboxItem [ _items . Length + 1 ] ; Array . Copy ( _items , tmp , _items . Length ) ; tmp [ tmp . Length - 1 ] = item ; _items = tmp ; } if ( _selIndex == - 1 ) { _selIndex = 0 ; Invalidate ( ) ; } }
Adds a item to the combo box
Adds a item to the combo box
// Update Array Size //item.Parent = this;
item
ListboxItem
Item to add
Item to add