Example #1
0
        public void RemoveItem(string name)
        {
            GComponent item  = _list.GetChildByName(name).asCom;
            int        index = _list.GetChildIndex(item);

            _list.RemoveChildAt(index);
        }
Example #2
0
        private void __clickItem(EventContext context)
        {
            if (_dropdownObject.parent is GRoot)
            {
                ((GRoot)_dropdownObject.parent).HidePopup(_dropdownObject);
            }
            _selectedIndex = _list.GetChildIndex((GObject)context.data);
            if (_selectedIndex >= 0)
            {
                this.text = _items[_selectedIndex];
            }
            else
            {
                this.text = string.Empty;
            }

            onChanged.Call();
        }