本文整理汇总了C#中Gtk.Window.EmitAdd方法的典型用法代码示例。如果您正苦于以下问题:C# Window.EmitAdd方法的具体用法?C# Window.EmitAdd怎么用?C# Window.EmitAdd使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gtk.Window
的用法示例。
在下文中一共展示了Window.EmitAdd方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ConsoleGtk
public ConsoleGtk ()
{
Window win = new Window ("MonoLOGO");
win.DeleteEvent += new EventHandler (Window_Delete);
win.BorderWidth = 4;
win.DefaultSize = new Size (450, 300);
VBox vbox = new VBox (false, 4);
win.EmitAdd (vbox);
ScrolledWindow swin = new ScrolledWindow (new Adjustment (0.0, 0.0, 0.0, 0.0, 0.0, 0.0), new Adjustment (0.0, 0.0, 0.0, 0.0, 0.0, 0.0));
swin.HscrollbarPolicy = Gtk.PolicyType.Automatic;
swin.VscrollbarPolicy = Gtk.PolicyType.Automatic;
swin.ShadowType = Gtk.ShadowType.In;
vbox.PackStart (swin, true, true, 0);
TextBuffer buf = new TextBuffer (new TextTagTable ());
Out = new TextWriterGtk (buf);
TextView text = new TextView (buf);
text.Editable = false;
swin.EmitAdd (text);
Entry entry = new Entry ();
entry.Activate += new EventHandler (Entry_Activate);
vbox.PackStart (entry, false, false, 0);
win.ShowAll ();
}