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


C# Notebook.ResizeChildren方法代码示例

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


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

示例1: 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


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