Gtk.Widget.Realize Method
Creates the GDK (windowing system) resources associated with a widget.

Syntax

public void Realize ()

Remarks

For example, widget->window will be created when a widget is realized. Normally realization happens implicitly; if you show a widget and all its parent containers, then it will be realized and mapped automatically. Realizing a widget requires all the widget's parent widgets to be realized; calling Widget.Realize realizes the widget's parents in addition to widget itself. If a widget is not yet inside a toplevel window when you realize it, bad things will happen.

This method is primarily used in widget implementations, and isn't very useful otherwise. Many times when you think you might need it, a better approach is to connect to a event that will be called after the widget is realized automatically, such as Widget.ExposeEvent. Or simply Glib.SignalAttr.ConnectAfter to the realize event.

Requirements

Namespace: Gtk
Assembly: gtk-sharp (in gtk-sharp.dll)