本文整理汇总了C#中Gtk.Notebook.SetTabLabel方法的典型用法代码示例。如果您正苦于以下问题:C# Notebook.SetTabLabel方法的具体用法?C# Notebook.SetTabLabel怎么用?C# Notebook.SetTabLabel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gtk.Notebook
的用法示例。
在下文中一共展示了Notebook.SetTabLabel方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Build
private void Build()
{
// toolbar
toolbar = new Toolbar();
// toolbar.MarginLeft = 10;
this.Add (toolbar);
var toolbarBox = (Gtk.Box.BoxChild)this [toolbar];
toolbarBox.Fill = false;
toolbarBox.Expand = false;
toolbarBox.Position = 0;
// toolbar choose database dropdown
Gtk.Label l = new Gtk.Label(string.Format("Current database: {0}", this.ServerConnection.Name));
ToolItem lTi = new ToolItem ();
lTi.Add (l);
toolbar.Insert (lTi, 0);
// toolbar exec button
ToolButton execBtn = new ToolButton (Gtk.Stock.MediaPlay);
execBtn.Clicked += (sender, e) => this.ExecuteCommand();
toolbar.Insert (execBtn, 1);
// vpaned
vpaned = new VPaned();
this.Add (vpaned);
// Sql area textbox wrapped in a scrolled window
ScrolledWindow sqlAreaScroll = new ScrolledWindow();
vpaned.Add1 (sqlAreaScroll);
sqlArea = new Mono.TextEditor.TextEditor();
sqlArea.Text = string.Format ("{0}{0}", System.Environment.NewLine);
sqlArea.SetCaretTo (1, 1);
sqlArea.CanFocus = true;
sqlArea.IsFocus = true;
var syntaxMode = loadSyntaxMode ();
sqlArea.Document.SyntaxMode = syntaxMode;
sqlAreaScroll.Add (sqlArea);
// result tabs
resultNoteBook = new Notebook ();
sqlResultContainer = new Gtk.ScrolledWindow ();
resultNoteBook.Add (sqlResultContainer);
resultNoteBook.SetTabLabel (sqlResultContainer, new Label ("Results"));
outputView = new TextView ();
outputView.Editable = false;
resultNoteBook.Add (outputView);
resultNoteBook.SetTabLabel (outputView, new Label ("Output"));
vpaned.Add2 (resultNoteBook);
vpaned.Position = 180;
}