void item_RemoveClicked(object sender, EventArgs e)
        {
            CoolCatItem item = sender as CoolCatItem;

            Items.Remove(item);
            flowLayout.Controls.Remove(item);
        }
        private void btnAdd_Click(object sender, EventArgs e)
        {
            CoolCatItem item = new CoolCatItem(this);

            Items.Add(item);
            flowLayout.Controls.Add(item);
            flowLayout.Controls.SetChildIndex(item, flowLayout.Controls.Count - 2);

            item.TabIndex         = Items.Count;
            item.RemoveClicked   += new EventHandler(item_RemoveClicked);
            item.LeftEditingMode += new EventHandler(item_LeftEditingMode);
            item.Focus();

            if (PlatformSpecific.IsMono())
            {
                item.Resize += new EventHandler(item_Resize_Mono);
                item_Resize_Mono(null, null);
            }
        }
Example #3
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            CoolCatItem item = new CoolCatItem(this);
            Items.Add(item);
            flowLayout.Controls.Add(item);
            flowLayout.Controls.SetChildIndex(item, flowLayout.Controls.Count - 2);

            item.TabIndex = Items.Count;
            item.RemoveClicked += new EventHandler(item_RemoveClicked);
            item.LeftEditingMode += new EventHandler(item_LeftEditingMode);
            item.Focus();

            if (PlatformSpecific.IsMono())
            {
                item.Resize += new EventHandler(item_Resize_Mono);
                item_Resize_Mono(null, null);
            }
        }