当前位置: 首页>>代码示例>>C#>>正文


C# Notebook.ShowAll方法代码示例

本文整理汇总了C#中Gtk.Notebook.ShowAll方法的典型用法代码示例。如果您正苦于以下问题:C# Notebook.ShowAll方法的具体用法?C# Notebook.ShowAll怎么用?C# Notebook.ShowAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Gtk.Notebook的用法示例。


在下文中一共展示了Notebook.ShowAll方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: WorkbenchView

        public WorkbenchView(WorkbenchController controller)
        {
            SplashWindow.Update ("Creating GUI");
            XML gxml = new Glade.XML (null,
                          WorkbenchSingleton.GLADEFILE,
                          "Workbench",
                          null);

            window = (Gtk.Window) gxml["Workbench"];
            Gtk.VPaned splitter = (Gtk.VPaned) gxml["mainPane"];

            editorNotebook = new EditorNotebook ();
            splitter.Pack1 (editorNotebook, true, false);

            ScrolledWindow sw = new ScrolledWindow ();
            console = new TextView ();
            console.Editable = false;
            console.WrapMode = WrapMode.Word;
            sw.Add (console);

            Notebook bottomNotebook = new Notebook ();
            bottomNotebook.AppendPage (sw, new Label ("Console"));
            splitter.Pack2 (bottomNotebook, true, false);

                        window.Icon = icon;
            this.WindowTitle = "";
            gxml.Autoconnect (controller);
            bottomNotebook.ShowAll ();
            editorNotebook.ShowAll ();
            SplashWindow.Update ("Simetron is ready!");
        }
开发者ID:BackupTheBerlios,项目名称:simetron,代码行数:31,代码来源:WorkbenchView.cs

示例2: ChatsPage

        private ChatsPage()
        {
            base.FocusGrabbed += base_FocusGrabbed;

            closePixbuf = new Gdk.Pixbuf(null, "FileFind.Meshwork.GtkClient.smallclose.png");

            tabLabelPages = new Dictionary<Widget, ChatSubpageBase>();

            notebook = new Notebook();
            notebook.TabPos = PositionType.Bottom;
            notebook.SwitchPage += notebook_SwitchPage;
            notebook.PageReordered += notebook_PageReordered;

            ScrolledWindow swindow = new ScrolledWindow();
            swindow.HscrollbarPolicy = PolicyType.Automatic;
            swindow.VscrollbarPolicy = PolicyType.Automatic;
            chatList = new TreeView ();
            swindow.Add(chatList);

            chatTreeStore = new NetworkGroupedTreeStore<ChatRoom>(chatList);
            chatList.Model = chatTreeStore;

            TreeViewColumn column;

            column = chatList.AppendColumn("Room Name", new CellRendererText(), new TreeCellDataFunc (NameDataFunc));
            column.Expand = true;
            column.Sizing = TreeViewColumnSizing.Autosize;

            var pixbufCell = new CellRendererPixbuf();
            column.PackStart(pixbufCell, false);
            column.SetCellDataFunc(pixbufCell, new TreeCellDataFunc(RoomSecureDataFunc));

            column = chatList.AppendColumn("Users", new CellRendererText(), new TreeCellDataFunc (RoomUsersDataFunc));
            column.Sizing = TreeViewColumnSizing.Autosize;

            chatList.RowActivated += chatList_RowActivated;
            chatList.ButtonPressEvent += chatList_ButtonPressEvent;

            EventBox box = new EventBox();
            box.Add(new Label("Chatroom List"));
            box.ButtonPressEvent += HandleTabButtonPressEvent;
            box.ShowAll();
            notebook.AppendPage(swindow, box);

            this.PackStart(notebook, true, true, 0);
            notebook.ShowAll();

            foreach (Network network in Core.Networks) {
                Core_NetworkAdded (network);
            }

            Core.NetworkAdded +=
                (NetworkEventHandler)DispatchService.GuiDispatch(
                    new NetworkEventHandler(Core_NetworkAdded)
                );
        }
开发者ID:codebutler,项目名称:meshwork,代码行数:56,代码来源:ChatsPage.cs

示例3: DatabaseEditor

        public DatabaseEditor(string filePath)
        {
            fileName = filePath;
            control = new Notebook();

            control.TabPos = PositionType.Bottom;
            control.AppendPage(new StructureDatabaseView(filePath),new Label(MainClass.Languages.Translate("sql_structure")));
            control.AppendPage(new DataDatabaseView(filePath),new Label(MainClass.Languages.Translate("sql_data")));
            control.AppendPage(new SqlDatabaseView(filePath),new Label(MainClass.Languages.Translate("sql_sql")));

            control.SwitchPage += new SwitchPageHandler(OnSwitchPage);

            control.ShowAll();
        }
开发者ID:moscrif,项目名称:ide,代码行数:14,代码来源:DatabaseEditor.cs

示例4: CreateNotebook

 private Widget CreateNotebook()
 {
     Notebook notebook = new Notebook();
        notebook.AppendPage(CreateServerPage(), new Label(Util.GS("Server")));
        notebook.AppendPage(CreateIdentityPage(), new Label(Util.GS("Identity")));
        notebook.AppendPage(CreateDiskSpacePage(), new Label(Util.GS("Disk Space")));
        notebook.ShowAll();
        return notebook;
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:9,代码来源:EnterpriseAccountDialog.cs

示例5: SelectReferenceDialog

		public SelectReferenceDialog ()
		{
			Build ();

			combinedBox = new CombinedBox ();
			combinedBox.Show ();
			mainBook = new Notebook ();
			combinedBox.Add (mainBook);
			alignment1.Add (combinedBox);
			mainBook.ShowAll ();

			filterEntry = combinedBox.FilterEntry;

			boxRefs.WidthRequest = 200;
			
			refTreeStore = new ListStore (typeof (string), typeof(string), typeof(string), typeof(ProjectReference), typeof(Xwt.Drawing.Image));
			ReferencesTreeView.Model = refTreeStore;

			TreeViewColumn col = new TreeViewColumn ();
			col.Title = GettextCatalog.GetString("Reference");
			CellRendererImage crp = new CellRendererImage ();
			crp.Yalign = 0f;
			col.PackStart (crp, false);
			col.AddAttribute (crp, "image", IconColumn);
			CellRendererText text_render = new CellRendererText ();
			col.PackStart (text_render, true);
			col.AddAttribute (text_render, "markup", NameColumn);
			text_render.Ellipsize = Pango.EllipsizeMode.End;
			
			ReferencesTreeView.AppendColumn (col);
//			ReferencesTreeView.AppendColumn (GettextCatalog.GetString ("Type"), new CellRendererText (), "text", TypeNameColumn);
//			ReferencesTreeView.AppendColumn (GettextCatalog.GetString ("Location"), new CellRendererText (), "text", LocationColumn);
			
			projectRefPanel = new ProjectReferencePanel (this);
			packageRefPanel = new PackageReferencePanel (this, false);
			allRefPanel = new PackageReferencePanel (this, true);
			assemblyRefPanel = new AssemblyReferencePanel (this);
			panels.Add (allRefPanel);
			panels.Add (packageRefPanel);
			panels.Add (projectRefPanel);
			panels.Add (assemblyRefPanel);
			
			//mainBook.RemovePage (mainBook.CurrentPage);
			
			HBox tab = new HBox (false, 3);
//			tab.PackStart (new Image (ImageService.GetPixbuf (MonoDevelop.Ide.Gui.Stock.Reference, IconSize.Menu)), false, false, 0);
			tab.PackStart (new Label (GettextCatalog.GetString ("_All")), true, true, 0);
			tab.BorderWidth = 3;
			tab.ShowAll ();
			mainBook.AppendPage (allRefPanel, tab);
			
			tab = new HBox (false, 3);
//			tab.PackStart (new Image (ImageService.GetPixbuf (MonoDevelop.Ide.Gui.Stock.Package, IconSize.Menu)), false, false, 0);
			tab.PackStart (new Label (GettextCatalog.GetString ("_Packages")), true, true, 0);
			tab.BorderWidth = 3;
			tab.ShowAll ();
			mainBook.AppendPage (packageRefPanel, tab);
			
			tab = new HBox (false, 3);
//			tab.PackStart (new Image (ImageService.GetPixbuf (MonoDevelop.Ide.Gui.Stock.Project, IconSize.Menu)), false, false, 0);
			tab.PackStart (new Label (GettextCatalog.GetString ("Pro_jects")), true, true, 0);
			tab.BorderWidth = 3;
			tab.ShowAll ();
			mainBook.AppendPage (projectRefPanel, tab);
			
			tab = new HBox (false, 3);
//			tab.PackStart (new Image (ImageService.GetPixbuf (MonoDevelop.Ide.Gui.Stock.OpenFolder, IconSize.Menu)), false, false, 0);
			tab.PackStart (new Label (GettextCatalog.GetString (".Net A_ssembly")), true, true, 0);
			tab.BorderWidth = 3;
			tab.ShowAll ();
			mainBook.AppendPage (assemblyRefPanel, tab);
			
			mainBook.Page = 0;
			
			var w = selectedHeader.Child;
			selectedHeader.Remove (w);
			HeaderBox header = new HeaderBox (1, 0, 1, 1);
			header.SetPadding (6, 6, 6, 6);
			header.GradientBackround = true;
			header.Add (w);
			selectedHeader.Add (header);
			
			RemoveReferenceButton.CanFocus = false;
			ReferencesTreeView.Selection.Changed += new EventHandler (OnChanged);
			Child.ShowAll ();
			OnChanged (null, null);
			InsertFilterEntry ();
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:88,代码来源:SelectReferenceDialog.cs

示例6: Initialize

        public void Initialize(IPadWindow window)
        {
            InitPopupMenu();

            // The breakpoint list
            localStore = new TreeStore (typeof(string), typeof(string), typeof(object), typeof(string), typeof(string));
            localTree = CreateTree (localStore);

            globalStore = new TreeStore (typeof(string), typeof(string), typeof(object), typeof(string), typeof(string));
            globalTree = CreateTree (globalStore);

            allStore = new TreeStore (typeof(string), typeof(string), typeof(object), typeof(string), typeof(string));
            allTree = CreateTree (allStore);

            notebook = new Notebook ();
            notebook.TabPos = PositionType.Top;

            var localControl = new ScrolledWindow ();
            localControl.ShadowType = ShadowType.None;
            localControl.Add (localTree);

            var globalControl = new ScrolledWindow ();
            globalControl.ShadowType = ShadowType.None;
            globalControl.Add (globalTree);

            var allControl = new ScrolledWindow ();
            allControl.ShadowType = ShadowType.None;
            allControl.Add (allTree);

            Label localLabel = new Label ("Local bookmarks");
            notebook.AppendPage (localControl, localLabel);

            Label globalLabel = new Label ("Global bookmarks");
            notebook.AppendPage (globalControl, globalLabel);

            Label allLabel = new Label ("All bookmarks");
            notebook.AppendPage (allControl, allLabel);

            notebook.ShowAll ();

            UpdateDisplay ();

            onBookmarksChanged = DispatchService.GuiDispatch<System.Action> (OnBookmarksChanged);
            BookmarkService.Instance.OnBookmarksChange += onBookmarksChanged;

            onFileChanged = DispatchService.GuiDispatch<System.Action>(OnFileChanged);
            BookmarkService.Instance.OnFileChage += onFileChanged;

            notebook.SwitchPage += (o, args) => { UpdateDisplay(); };
        }
开发者ID:Indomitable,项目名称:monodevelop-bookmarks,代码行数:50,代码来源:BookmarksPad.cs

示例7: MainWindow

        public MainWindow()
        {
            ToolItem        spacerItem;
            FileSearchEntry searchEntry;
            ToolItem        searchEntryItem;
            Alignment       searchEntryBox;

            object[] attrs= Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyTitleAttribute), true);
            AssemblyTitleAttribute attr = (AssemblyTitleAttribute)attrs[0];
            AssemblyName asmName = Assembly.GetExecutingAssembly().GetName();

            string title = String.Format ("{0} (BETA) {1} (Protocol Version: {2})",
                                      attr.Title, asmName.Version,
                                      Core.ProtocolVersion);

            // Create the interface
            window = new Window (title);
            window.SetDefaultSize (850, 550);
            window.DeleteEvent += on_win_delete;
            window.ConfigureEvent += on_MainWindow_configure_event;
            window.FocusInEvent += window_FocusInEvent;

            ((ToggleAction)Runtime.BuiltinActions["ToggleMainToolbar"]).Active = Gui.Settings.ShowToolbar;
            Runtime.BuiltinActions["ToggleMainToolbar"].Activated += ToggleMainToolbar_Activated;

            ((ToggleAction)Runtime.BuiltinActions["ToggleMainStatusbar"]).Active = Gui.Settings.ShowStatusBar;
            Runtime.BuiltinActions["ToggleMainStatusbar"].Activated += ToggleMainStatusbar_Activated;
            window.AddAccelGroup (Runtime.UIManager.AccelGroup);

            mainVBox = new VBox ();
            window.Add (mainVBox);
            mainVBox.Show ();

            if (Common.OSName == "Darwin") {
                MenuBar menubar = (MenuBar) Runtime.UIManager.GetWidget ("/OSXAppMenu");

                Imendio.MacIntegration.Menu.SetMenuBar(menubar);

                MenuItem preferencesItem = (MenuItem) Runtime.UIManager.GetWidget ("/OSXAppMenu/NetworkMenu/Preferences");
                MenuItem aboutItem = (MenuItem) Runtime.UIManager.GetWidget ("/OSXAppMenu/NetworkMenu/About");

                IntPtr group = Imendio.MacIntegration.Menu.AddAppMenuGroup();

                Imendio.MacIntegration.Menu.AddAppMenuItem(group, aboutItem, "About Meshwork");

                group = Imendio.MacIntegration.Menu.AddAppMenuGroup();

                Imendio.MacIntegration.Menu.AddAppMenuItem(group, preferencesItem, "Preferences");

                MenuItem quitItem = (MenuItem) Runtime.UIManager.GetWidget ("/OSXAppMenu/NetworkMenu/Quit");
                Imendio.MacIntegration.Menu.SetQuitMenuItem(quitItem);
            } else {
                MenuBar menubar = (MenuBar) Runtime.UIManager.GetWidget ("/MainWindowMenuBar");
                mainVBox.PackStart (menubar, false, false, 0);
                menubar.Show ();
            }

            toolbar = (Toolbar) Runtime.UIManager.GetWidget ("/MainWindowToolbar");
            toolbar.ToolbarStyle = ToolbarStyle.BothHoriz;
            toolbar.IconSize = IconSize.LargeToolbar;

            spacerItem = new ToolItem();
            spacerItem.Expand = true;
            toolbar.Insert(spacerItem, -1);
            spacerItem.Show();

            searchEntry = new FileSearchEntry();

            searchEntryBox = new Alignment(0.5f, 0.5f, 0, 0);
            searchEntryBox.LeftPadding = 4;
            searchEntryBox.RightPadding = 1;
            searchEntryBox.Add(searchEntry);

            searchEntryItem = new ToolItem();
            searchEntryItem.Add(searchEntryBox);

            toolbar.Insert(searchEntryItem, -1);
            searchEntryItem.ShowAll();

            mainVBox.PackStart (toolbar, false, false, 0);

            mainPaned = new HPaned();
            mainPaned.Mapped += delegate (object sender, EventArgs args) {
                // XXX: Remember the user's last setting instead
                mainPaned.Position = 190;

                // Set some colors
                //infoBoxSeparator.ModifyBg(StateType.Normal, GtkHelper.DarkenColor (mainbar.Style.Background(StateType.Normal), 2));
                //infoSwitcherTree.ModifyBase(StateType.Normal, infoSwitcherTree.Style.Base(StateType.Active));
                //infoSwitcherTree.ModifyBase(StateType.Active, infoBoxSeparator.Style.Base(StateType.Selected));
            };
            mainPaned.Show();
            mainVBox.PackStart (mainPaned, true, true, 0);

            // Create page notebook
            pageNotebook = new Notebook();
            pageNotebook.ShowTabs = false;
            pageNotebook.ShowBorder = false;
            mainPaned.Pack2(pageNotebook, true, true);
            pageNotebook.ShowAll();
//.........这里部分代码省略.........
开发者ID:codebutler,项目名称:meshwork,代码行数:101,代码来源:MainWindow.cs

示例8: AddTabFromFile

 /// <summary>
 /// Adds the tab from file. Use this method only if you want to save a file to a new filename.
 /// </summary>
 /// <param name='_nb'>
 /// The notebook.
 /// </param>
 /// <param name='_fileNameNew'>
 /// The new Filename
 /// </param>
 /// <param name='_pageindex'>
 /// The index of the page.
 /// </param>
 public static void AddTabFromFile(Notebook _nb, string _fileNameNew, int _pageindex)
 {
     try {
         if (System.IO.File.Exists (_fileNameNew)) {
             //FileName = FileNameNew;	//Fixme: If nothing happens, change this comment.
             libTerminus.cRegex newregex;
             if (g_tmp != null) {
                 newregex = g_tmp;
                 g_tmp = null;
             } else {
                 newregex = new cRegex (_fileNameNew);
             }
             _nb.InsertPage (newregex, new Label (new FileInfo (_fileNameNew).Name, ref _nb, newregex), _pageindex);
             _nb.ShowAll ();
             g_files.Add (_fileNameNew);
         } else {
             libTerminus.cRegex newregex = new cRegex (_fileNameNew);
             _nb.InsertPage (newregex, new Label (Catalog.GetString ("New Phrase"), ref _nb, newregex), _pageindex);
             _nb.ShowAll ();
             g_files.Add (_fileNameNew);
         }
     } catch (Exception ex) {
         MessageBox.Show ("error: " + ex.Message, cTerminus.g_programName, ButtonsType.Close, MessageType.Error);
     }
 }
开发者ID:squarerootfury,项目名称:terminus,代码行数:37,代码来源:cTerminus.cs

示例9: AddTab

        //public static bool enableDataBase;
        /// <summary>
        /// Adds a new tab to the given notebook
        /// </summary>
        /// <param name='_nb'>
        /// The notebook.
        /// </param>
        /// <param name='_filename'>
        /// The filename. If you have a filename, use it. If you don't have a filename, use "" instead.
        /// </param>
        public static void AddTab(Notebook _nb, string _filename)
        {
            try {
                string FileName;
                if (System.IO.File.Exists (_filename))
                    FileName = new System.IO.FileInfo (_filename).Name;
                else
                    FileName = "";

                libTerminus.cRegex newregex = new cRegex (_filename);
                newregex.Saved = true;
                _nb.AppendPage (newregex, new Label (Catalog.GetString ("New Phrase"), ref _nb, newregex));
                _nb.ShowAll ();
                _nb.Page = _nb.NPages - 1;
                g_files.Add (_filename);
            } catch (Exception ex) {
                MessageBox.Show (ex.Message, cTerminus.g_programName, ButtonsType.Close, MessageType.Error);
            }
        }
开发者ID:squarerootfury,项目名称:terminus,代码行数:29,代码来源:cTerminus.cs

示例10: addLibraryTab

        /// <summary>
        /// Adds the library tab.
        /// </summary>
        /// <param name='_nb'>
        /// Nb.
        /// </param>
        public static void addLibraryTab(Notebook _nb)
        {
            try {
                if (isLibTabOpen != true) {
                    cPool lib = new libTerminus.cPool (ref _nb);
                    _nb.AppendPage (lib, new Label (Catalog.GetString ("Library"), ref _nb, lib));
                    _nb.ShowAll ();
                    _nb.Page = _nb.NPages - 1;
                    LibTabIndex = _nb.Page;
                } else {
                    //BUGGY: _nb.Page = LibTabIndex;

                }
            } catch (Exception ex) {
                MessageBox.Show (ex.Message, cTerminus.g_programName, ButtonsType.Close, MessageType.Error);
            }
        }
开发者ID:squarerootfury,项目名称:terminus,代码行数:23,代码来源:cTerminus.cs

示例11: addConfigTab

 /// <summary>
 /// Adds the config tab.
 /// </summary>
 /// <param name='_nb'>
 /// Nb.
 /// </param>
 public static void addConfigTab(Notebook _nb)
 {
     try {
         if (isConfigTabOpen != true) {
             libTerminus.cConfig config = new libTerminus.cConfig (Configuration);
             _nb.AppendPage (config, new Label (Catalog.GetString ("Preferences"), ref _nb, config));
             _nb.ShowAll ();
             _nb.Page = _nb.NPages - 1;
             ConfigTabIndex = _nb.Page;
         } else {
             //BUGGY:_nb.Page = ConfigTabIndex;
         }
     } catch (Exception ex) {
         MessageBox.Show (ex.Message, cTerminus.g_programName, ButtonsType.Close, MessageType.Error);
     }
 }
开发者ID:squarerootfury,项目名称:terminus,代码行数:22,代码来源:cTerminus.cs

示例12: NewEditorTab

		public EditorTab NewEditorTab () 
		{
			EditorTab tab = new EditorTab();		
			editorTabs.Add(tab);
			
			currentEditorTab = tab;

			// top pane - sql editor

			SqlEditorSharp editor;
			editor = new SqlEditorSharp ();
			editor.Tab = tab;
			editor.UseSyntaxHiLighting = false;
			editor.View.Show ();
			editor.View.KeyPressEvent +=
				new Gtk.KeyPressEventHandler(OnKeyPressEventKey);

			lastUnknownFile ++;
			string unknownFile = "Unknown" + 
				lastUnknownFile.ToString() + ".sql";
			Label label = new Label(unknownFile);
			label.Show();

			// bottom pane - output results
			Notebook resultsNotebook = new Notebook();
			tab.resultsNotebook = resultsNotebook;
			resultsNotebook.TabPos = PositionType.Bottom;
			resultsNotebook.SwitchPage += new 
				Gtk.SwitchPageHandler(OnResultsNotebookSwitched);
			
			DataGrid grid = CreateOutputResultsDataGrid ();
			grid.View.Selection.Mode = SelectionMode.Multiple;
			tab.grid = grid;
			grid.Show();
			Label label2 = new Label("Grid");
			label2.Show();
			
			ScrolledWindow swin = CreateOutputResultsTextView (tab);
			swin.Show();

			tab.editor = editor;
			tab.label = label;
			tab.filename = "";
			tab.basefilename = unknownFile;

			Label label3 = new Label("Log");
			label3.Show();

			// finish the notebooks

			tab.frame = new Frame();
			tab.frame.ShadowType = ShadowType.None;
			tab.frame.Add (grid);
			tab.GridPage = resultsNotebook.AppendPage(tab.frame, label2);
			tab.LogPage = resultsNotebook.AppendPage(swin, label3);

			resultsNotebook.ShowAll ();
			resultsNotebook.ResizeChildren ();

			if (outputResults == OutputResults.TextView)
				resultsNotebook.CurrentPage = 1;
			else if (outputResults == OutputResults.DataGrid)
				resultsNotebook.CurrentPage = 0;

			tab.Add1 (editor);
			tab.Add2 (resultsNotebook);

			sourceFileNotebook.AppendPage(tab, label);

			sourceFileNotebook.ShowAll ();
			sourceFileNotebook.ResizeChildren ();

			sourceFileNotebook.CurrentPage = -1;

			tab.page = sourceFileNotebook.CurrentPage;
			UpdateTitleBar(tab);

			SetFocusToEditor ();

			return tab;
		}
开发者ID:emtees,项目名称:old-code,代码行数:81,代码来源:sqlsharpgtk.cs

示例13: CreateNotebook

 private Widget CreateNotebook()
 {
     Notebook notebook = new Notebook();
        notebook.AppendPage(CreateAccountPage(), new Label(Util.GS("Account")));
        notebook.ShowAll();
        return notebook;
 }
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:7,代码来源:BonjourAccountDialog.cs

示例14: MainWindow

        public MainWindow()
            : base("This is a window test")
        {
            DeleteEvent += onDeleteEvent;
            SetSizeRequest( 800, 600 );

            df = new DockFrame();
            df.DefaultItemHeight = 100;
            df.DefaultItemWidth = 100;
            //df.Homogeneous = false;

            Add( df );

            DockItem doc_item = df.AddItem( "Document" );
            doc_item.Behavior = DockItemBehavior.CantClose;
            doc_item.Expand = true;
            doc_item.DrawFrame = true;
            doc_item.Label = "Documentos";
            Gtk.Notebook nb = new Notebook();
            nb.AppendPage( new Label( "Other page" ), new Label( "The label" ) );
            nb.AppendPage( new TextView(), new Image( "gtk-new", IconSize.Menu ) );
            nb.ShowAll();
            doc_item.Content = nb;
            doc_item.DefaultVisible = true;
            doc_item.Visible = true;

            DockItem left = df.AddItem( "left" );
            left.Behavior = DockItemBehavior.NeverHorizontal;
            left.DefaultLocation = "Document/Left";
            left.DefaultVisible = true;
            left.Visible = true;
            left.Label = "Left";
            left.DrawFrame = true;
            left.Content = new Label( "This is a test" );

            DockItem right = df.AddItem( "right" );
            right.Behavior = DockItemBehavior.CantClose;
            right.DefaultLocation = "Document/Right";
            right.DefaultVisible = true;
            right.Visible = true;
            right.Label = "Right";
            right.DrawFrame = true;
            right.Content = new Label( "CONTENT" );
            //right.Icon = "gtk-close";

            DockItem rb = df.AddItem( "right_bottom" );
            rb.Behavior = DockItemBehavior.CantClose;
            rb.DefaultLocation = "right/Bottom";
            rb.DefaultVisible = true;
            rb.Visible = true;
            rb.Label = "Right bottom";
            rb.DrawFrame = true;
            rb.Content = new Button( "A BUTTON!" );
            rb.Behavior = DockItemBehavior.CantClose;
            //rb.Icon = "gtk-new";

            if ( File.Exists( "config.layout" ) )
            {
                df.LoadLayouts( "config.layout" );
            }
            else
            {
                df.CreateLayout( "test", true );
            }
            df.CurrentLayout = "test";
            df.HandlePadding = 0;
            df.HandleSize = 10;

            ShowAll();
        }
开发者ID:amolenaar,项目名称:MonoDockingWidget,代码行数:70,代码来源:TestDock.cs


注:本文中的Gtk.Notebook.ShowAll方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。