Re: Accessing a GtkTable's children.




Thank you so much Andrew!

It is now working beautifully. The final code is below for anyone who may
read this thread looking for the same fix.

void on_toggletoolbutton_enable_toggled( GtkToggleToolButton
*toggletoolbutton, gpointer user_data )
{
        GtkTable *parent = (GtkTable*)
gtk_widget_get_parent((GtkWidget*)toggletoolbutton);
        GList *children = gtk_container_get_children(parent);
        int len = g_list_length(children);
        int i;
        for(i=0; i < len; i++)
        {
                GtkWidget *test = (GtkWidget*) g_list_nth_data(children, i);                    
                g_printf("Widget %d is %s.\n", i, gtk_widget_get_name (test));
        }
. . . 

 - Craig
-- 
View this message in context: http://www.nabble.com/Accessing-a-GtkTable%27s-children.-tf3539983.html#a9882649
Sent from the Gtk+ - Apps Dev mailing list archive at Nabble.com.




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