Tinkr2/4.2/AphelionCore/AphelionCommonControls/Controls/Combobox.cs
/// <summary>
/// Adds a number of items to the combo box
/// </summary>
/// <param name="items">Items to add</param>
Adds a number of items to the combo box
Adds a number of items to the combo box
public void AddItems(ListboxItem[] items)
      {
         if (items == null)
         {
            return;
         }
         Suspended = true;
         try
         {
            if (_items == null)
            {
               _items = items;
            }
            else
            {
               var tmp = new ListboxItem[_items.Length + items.Length];
               Array.Copy(_items, tmp, _items.Length);
               Array.Copy(items, 0, tmp, _items.Length, items.Length);
               _items = tmp;
            }
            if (_selIndex == -1)
            {
               _selIndex = 0;
            }
         }
         finally
         {
            Suspended = false;
         }
      }
public void AddItems ( ListboxItem [ ] items ) { if ( items == null ) { return ; } Suspended = true ; try { if ( _items == null ) { _items = items ; } else { var tmp = new ListboxItem [ _items . Length + items . Length ] ; Array . Copy ( _items , tmp , _items . Length ) ; Array . Copy ( items , 0 , tmp , _items . Length , items . Length ) ; _items = tmp ; } if ( _selIndex == - 1 ) { _selIndex = 0 ; } } finally { Suspended = false ; } }
Adds a number of items to the combo box
Adds a number of items to the combo box
//for (int i = 0; i < items.Length; i++) //    items[i].Parent = this;
items
ListboxItem[]
Items to add
Items to add