Пример #1
0
        public void AddItem(DockItem item)
        {
            // check if already there
            if (items.Contains (item)) {
                Console.WriteLine ("WARNING: Item has already been added to the dockbar");
                return;
            }

            items.Add (item);

            // create a button for the item
            DockBarButton button = new DockBarButton (item);
            this.PackStart (button, false, false, 0);
            tooltips.SetTip (button, item.Name, item.Name);
            item.DockBar = this;
            item.DockBarButton = button;
            button.Clicked += new EventHandler (OnDockButtonClicked);
            this.ShowAll ();
        }
Пример #2
0
        public void AddItem(DockItem item)
        {
            // check if already there
            if (items.Contains(item))
            {
                Console.WriteLine("WARNING: Item has already been added to the dockbar");
                return;
            }

            items.Add(item);

            // create a button for the item
            DockBarButton button = new DockBarButton(item);

            this.PackStart(button, false, false, 0);
            button.TooltipText = item.LongName;
            item.DockBar       = this;
            item.DockBarButton = button;
            button.Clicked    += new EventHandler(OnDockButtonClicked);
            this.ShowAll();
        }