示例#1
0
 public void AddItem(System.Drawing.Design.ToolboxItem Item, int TabIndex, ToolBoxItemDetails details)
 {
     if (TabIndex > arrTabs.Count - 1 && TabIndex < 0)
     {
         MessageBox.Show("Invalid Index value given to AddItem");
         return;
     }
     GetTab(TabIndex).AddItem(Item);
     //GetTab(TabIndex).ImgIndex = details.ImageIndex;
     //GetTab(TabIndex).ListV.Items.Add(details.Caption, details.ImageIndex);
     //GetTab(TabIndex).ListV.Items[0].Selected = true;
 }
示例#2
0
        public void AddItem(System.Drawing.Design.ToolboxItem Item, int TabIndex, ToolBoxItemDetails details, string imagePath, string toolTip)
        {
            if (TabIndex > arrTabs.Count - 1 && TabIndex < 0)
            {
                MessageBox.Show("Invalid Index value given to AddItem");
                return;
            }
            ToolBoxTab tab = GetTab(TabIndex);

            tab.AddItem(Item);
            tab.ImgListView.Items.Add(imagePath, toolTip, details.Caption);
            tab.ImgListView.Items[0].Selected = true;
            tab.ImgListView.BringToFront();
        }