Package: gtk

Function gtk-widget-realize

Lambda List

gtk-widget-realize (widget)

Arguments

widget -- a gtk-widget object

Details

Creates the GDK resources associated with a widget. For example, the GDK window will be created when a widget is realized. Normally realization happens implicitly. If you show a widget and all its parent containers, then the widget will be realized and mapped automatically.

Realizing a widget requires all the parent widgets of the widget to be realized. Calling the gtk-widget-realize function realizes the parents of the widget in addition to the widget itself. If a widget is not yet inside a toplevel window when you realize it, bad things will happen.

This function is primarily used in widget implementations, and is not very useful otherwise. Many times when you think you might need it, a better approach is to connect to a signal that will be called after the widget is realized automatically, such as the "draw" signal. Or simply use the g-signal-connect function with the "realize" signal.
 

See also

2021-9-16