realize() allocates the GDK resources associated with the calling widget. A widget must be realized before it can be mapped to the screen. This means that when show() is called, the widget is first realized and then mapped to the screen.

Before a widget can be realized, its parent and all of its ancestors must be realized. If an ancestor of a widget has not been realized at the time realize() is called, it will be implicitly realized before the calling widget is realized.

If you want a widget to be displayed on the screen do not use realize() . Instead use show() . See the pixmap tutorial for an example of when it is appropriate to use realize() .

See also: map() unrealize() .

© Copyright 2003-2023 The ultimate PHP Editor and PHP IDE site.