Re: Problem swapping GtkScrolledWindow contents on the fly



Still getting strange results with this.

Ive posted a skeleton app at www.simple.org/TCSAdminGTK.tar which is a single source file which can be comiled with g++ ./main.cpp `pkg-config --cflags --libs libgnome-2.0 libgnomeui-2.0 libglade-2.0`
When you click one of the options on the left the contents changes on 
the right. At present only 'General' and 'Calls' are implemented. As you 
can see the first time you click one of these the widgets show correctly 
but the second time you click it they don't but you get no error on the 
console either.

The guts of the issue are contained in the functions showGeneralPage() and showCallsPage()

The closest explaination Ive been able to find is that the call to

gtk_container_remove (GTK_CONTAINER (rightpanescrollview),gtk_bin_get_child(GTK_BIN(rightpanescrollview)));
is deleting the widgets as well as just removing them from the 
container, but theres no error to suggest this, and I would have thought 
the calls to gtk_widget_ref(callspage) or gtk_widget_ref(generalpage) 
would have prevented this.
There must be something very simple Im overlooking here. Any ideas?

Thanks
Andrew



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]