Getting a Widget Choice
- From: dhk <dhkuhl optonline net>
- To: gtk-app-devel-list gnome org
- Subject: Getting a Widget Choice
- Date: Sat, 20 Feb 2010 09:04:08 -0500
When a widget can be gotten by using GTK builder functions or GTK Widget
functions, does it make a difference, or is one way better than the
other, for finding the widget.
For example when I can get the same widget using either of the following
two calls, which one should I use and why?
GtkWidget *nb=NULL; /* A notebook widget */
/* Call 1 */
nb=GTK_WIDGET(gtk_builder_get_object(gtk_builder, "notebook_name"));
/* Call 2 */
nb=gtk_widget_get_ancestor(widget, GTK_TYPE_NOTEBOOK);
Thanks,
dhk
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]