本文整理汇总了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;
}