PROBLEM:
I wanted to create an invisible widget to swap out during run-time with another widget based on the the program's context and user selection.
The problem that I ran into was that the functions:
gtk_widget_hide() and gtk_widget_show() worked fine for me after the widget(s) were initially rendered... but I didn't want to have to display it until it was needed (and didn't really want to create it on the fly either.)
SOLUTION:
After a LOT of experimentation, and undesirable "work-arounds", I searched for an appropriate property and discovered (within Krause's book) the "no-show-all" GtkWidget" property which prevents the widget from "initially" being displayed. I then used gtk_widget_show() & gtk_widget_hide() during runtime to manage display of the widget.
So... in essence, it is as simple as:
Code:
g_object_set( widget, "no-show-all", TRUE, NULL);