コード例 #1
0
        void item_RemoveClicked(object sender, EventArgs e)
        {
            CoolCatItem item = sender as CoolCatItem;

            Items.Remove(item);
            flowLayout.Controls.Remove(item);
        }
コード例 #2
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);
            }
        }
コード例 #3
0
ファイル: CoolCat.cs プロジェクト: atlight/ForTheCommonGood
        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);
            }
        }