Exemple #1
0
        void OnTabPress(object s, Gtk.ButtonPressEventArgs args)
        {
            CurrentTab = Array.IndexOf(box.Children, s);
            DockItemTitleTab t = (DockItemTitleTab)s;

            DockItem.SetFocus(t.Page);
            QueueDraw();
            args.RetVal = true;
        }
Exemple #2
0
		public void AddTab (DockItemTitleTab tab)
		{
			if (tab.Parent != null)
				((Gtk.Container)tab.Parent).Remove (tab);

			//box.PackStart (tab, true, true, 0);
			box.PackStart (tab, false, false, 0);
			tab.WidthRequest = tab.LabelWidth;
			if (currentTab == -1)
				CurrentTab = box.Children.Length - 1;
			else {
				tab.Active = false;
				tab.Page.Hide ();
			}
			
			tab.ButtonPressEvent += OnTabPress;
		}
Exemple #3
0
        public void AddTab(DockItemTitleTab tab)
        {
            if (tab.Parent != null)
            {
                ((Gtk.Container)tab.Parent).Remove(tab);
            }

            //box.PackStart (tab, true, true, 0);
            box.PackStart(tab, false, false, 0);
            tab.WidthRequest = tab.LabelWidth;
            if (currentTab == -1)
            {
                CurrentTab = box.Children.Length - 1;
            }
            else
            {
                tab.Active = false;
                tab.Page.Hide();
            }

            tab.ButtonPressEvent += OnTabPress;
        }