Getting a Widget Choice



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]