本文整理汇总了C#中Gtk.VBox.Realize方法的典型用法代码示例。如果您正苦于以下问题:C# VBox.Realize方法的具体用法?C# VBox.Realize怎么用?C# VBox.Realize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gtk.VBox
的用法示例。
在下文中一共展示了VBox.Realize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateWindow
private void CreateWindow (string query)
{
Title = Best.DefaultWindowTitle;
DeleteEvent += new DeleteEventHandler (this.DoDelete);
MapEvent += new MapEventHandler (MapIt);
UnmapEvent += new UnmapEventHandler (UnmapIt);
Icon = Images.GetPixbuf ("best.png");
Widget content = CreateContents ();
VBox main = new VBox (false, 3);
main.PackStart (content, true, true, 3);
content.Show ();
Add (main);
main.Show ();
main.Realize ();
canvas.Realize ();
root = new SimpleRootTile ();
canvas.Root = root;
DefaultWidth = 600;
DefaultHeight = 675;
accel_group = new Gtk.AccelGroup ();
this.AddAccelGroup (accel_group);
global_keys = new GlobalKeybinder (accel_group);
// Close window (Ctrl-W)
global_keys.AddAccelerator (new EventHandler (this.HideWindowHandler),
(uint) Gdk.Key.w,
Gdk.ModifierType.ControlMask,
Gtk.AccelFlags.Visible);
// Close window (Escape)
global_keys.AddAccelerator (new EventHandler (this.HideWindowHandler),
(uint) Gdk.Key.Escape,
0,
Gtk.AccelFlags.Visible);
// Show source (Ctrl+U)
global_keys.AddAccelerator (new EventHandler (this.ShowSource),
(uint) Gdk.Key.U,
Gdk.ModifierType.ControlMask,
Gtk.AccelFlags.Visible);
// Focus Entry (Ctrl+L)
global_keys.AddAccelerator (new EventHandler (this.FocusEntryHandler),
(uint) Gdk.Key.L,
Gdk.ModifierType.ControlMask,
Gtk.AccelFlags.Visible);
// Previous Page (PageUp)
global_keys.AddAccelerator (new EventHandler (this.PageBackHandler),
(uint) Gdk.Key.Page_Up,
0,
Gtk.AccelFlags.Visible);
// Next Page (PageDown)
global_keys.AddAccelerator (new EventHandler (this.PageForwardHandler),
(uint) Gdk.Key.Page_Down,
0,
Gtk.AccelFlags.Visible);
UpdateFromConf ();
UpdatePage ();
if (query != null)
Search (query);
}