Exemplo n.º 1
0
        private void AddPropertyTab(PropertyTab tab)
        {
            TabRadioToolButton rtb;

            if (propertyTabs.Count == 0)
            {
                selectedTab = tab;
                rtb         = new TabRadioToolButton(null);
                rtb.Active  = true;
                firstTab    = rtb;
#if false // Commented out by SLohse. Our PropertyGrid currently only supports 1 tab page, so no icon in the toolbar is needed.
                toolbar.Insert(new SeparatorToolItem(), FirstTabIndex - 1);
#endif
            }
            else
            {
                rtb = new TabRadioToolButton(firstTab);
            }

            //load image from PropertyTab's bitmap
            var icon = tab.GetIcon();
            if (icon != null)
            {
                rtb.Image = new Gtk.Image(icon);
            }
            else
            {
                rtb.Image = new Gtk.Image(Stock.MissingImage, IconSize.Menu);
            }

            rtb.Tab         = tab;
            rtb.TooltipText = tab.TabName;
            rtb.Toggled    += new EventHandler(toolbarClick);

#if false // Commented out by SLohse. Our PropertyGrid currently only supports 1 tab page, so no icon in the toolbar is needed.
            toolbar.Insert(rtb, propertyTabs.Count + FirstTabIndex);
#endif

            propertyTabs.Add(tab);
        }
Exemplo n.º 2
0
        private void AddPropertyTab(PropertyTab tab)
        {
            TabRadioToolButton rtb;

            if (propertyTabs.Count == 0)
            {
                selectedTab = tab;
                rtb         = new TabRadioToolButton(null);
                rtb.Active  = true;
                firstTab    = rtb;
                toolbar.Insert(tabSectionSeparator = new SeparatorToolItem(), FirstTabIndex - 1);
            }
            else
            {
                rtb = new TabRadioToolButton(firstTab);
            }

            //load image from PropertyTab's bitmap
            var icon = tab.GetIcon();

            if (icon != null)
            {
                rtb.Image = new Gtk.Image(icon);
            }
            else
            {
                rtb.Image = new Gtk.Image(Stock.MissingImage, IconSize.Menu);
            }

            rtb.Tab         = tab;
            rtb.TooltipText = tab.TabName;
            rtb.Toggled    += new EventHandler(toolbarClick);

            toolbar.Insert(rtb, propertyTabs.Count + FirstTabIndex);

            propertyTabs.Add(tab);
        }
Exemplo n.º 3
0
        private void AddPropertyTab(PropertyTab tab)
        {
            TabRadioToolButton rtb;
            if (propertyTabs.Count == 0) {
                selectedTab = tab;
                rtb = new TabRadioToolButton (null);
                rtb.Active = true;
                firstTab = rtb;
                toolbar.Insert (tabSectionSeparator = new SeparatorToolItem (), FirstTabIndex - 1);
            }
            else
                rtb = new TabRadioToolButton (firstTab);

            //load image from PropertyTab's bitmap
            var icon = tab.GetIcon ();
            if (icon != null)
                rtb.Image = new ImageView (icon);
            else
                rtb.Image = new ImageView (MonoDevelop.Ide.ImageService.GetIcon (Stock.MissingImage, IconSize.Menu));

            rtb.Tab = tab;
            rtb.TooltipText = tab.TabName;
            rtb.Toggled += new EventHandler (toolbarClick);

            toolbar.Insert (rtb, propertyTabs.Count + FirstTabIndex);

            propertyTabs.Add(tab);
        }
Exemplo n.º 4
0
        private void AddPropertyTab(PropertyTab tab)
        {
            TabRadioToolButton rtb;
             if(propertyTabs.Count == 0)
             {
            selectedTab = tab;
            rtb = new TabRadioToolButton(null);
            rtb.Active = true;
            firstTab = rtb;
            #if false // Commented out by SLohse. Our PropertyGrid currently only supports 1 tab page, so no icon in the toolbar is needed.
                toolbar.Insert (new SeparatorToolItem (), FirstTabIndex - 1);
            #endif
             }
             else
            rtb = new TabRadioToolButton(firstTab);

             //load image from PropertyTab's bitmap
             var icon = tab.GetIcon();
             if(icon != null)
            rtb.Image = new Gtk.Image(icon);
             else
            rtb.Image = new Gtk.Image(Stock.MissingImage, IconSize.Menu);

             rtb.Tab = tab;
             rtb.TooltipText = tab.TabName;
             rtb.Toggled += new EventHandler(toolbarClick);

            #if false // Commented out by SLohse. Our PropertyGrid currently only supports 1 tab page, so no icon in the toolbar is needed.
            toolbar.Insert (rtb, propertyTabs.Count + FirstTabIndex);
            #endif

             propertyTabs.Add(tab);
        }