Unable to find child widgets of an hbox



I am attempting to use the code below to find several child widgets of a window.  In this window is a vbox.  
Within the vbox are an hbox, table, and combo.  Within the hbox are two labels and two combos.  Within the 
table are a vbox, hbox, and drawingarea.  The code below is able to find all of the wigets listed except for 
the widgets contained within the hbox.  Does anyone know if this is a bug in gtk+1.2.8?  Any and all help 
would be appreciated.  Thanks in advance.



                                -- Stupid Genius



        GtkWidget       *vbox = (GtkWidget *) NULL,
                        *hbox = (GtkWidget *) NULL,
                        *table = (GtkWidget *) NULL,
                        *drawing_area = (GtkWidget *) NULL,
                        *test_list_combo = (GtkWidget *) NULL,
                        *histogram_bins_combo = (GtkWidget *) NULL,
                        *vruler = (GtkWidget *) NULL,
                        *hruler = (GtkWidget *) NULL;

        GList           *widget_list;



        /* Setting widget address' to local variable names */
        for ( widget_list = gtk_container_children(GTK_CONTAINER(histogram_window)) ; widget_list != NULL ; 
widget_list = widget_list->next )
        {
                if ( GTK_IS_VBOX(GTK_OBJECT(widget_list->data)) )
                        vbox = GTK_WIDGET(widget_list->data);
        }
        for ( widget_list = gtk_container_children(GTK_CONTAINER(vbox)) ; widget_list != NULL ; widget_list = 
widget_list->next )
        {
                if ( GTK_IS_HBOX(GTK_OBJECT(widget_list->data)) )
                        hbox = GTK_WIDGET(widget_list->data);
                if ( GTK_IS_TABLE(GTK_OBJECT(widget_list->data)) )
                        table = GTK_WIDGET(widget_list->data);
                if ( GTK_IS_COMBO(GTK_OBJECT(widget_list->data)) )
                        test_list_combo = GTK_WIDGET(widget_list->data);
        }
        for ( widget_list = gtk_container_children(GTK_CONTAINER(hbox)) ; widget_list != NULL ; widget_list = 
widget_list->next )
        {
                if ( GTK_IS_COMBO(GTK_OBJECT(widget_list->data)) )
                        histogram_bins_combo = GTK_WIDGET(widget_list->data);
        }
        for ( widget_list = gtk_container_children(GTK_CONTAINER(table)) ; widget_list != NULL ; widget_list 
= widget_list->next )
        {
                if ( GTK_IS_DRAWING_AREA(GTK_OBJECT(widget_list->data)) )
                        drawing_area = GTK_WIDGET(widget_list->data);
                if ( GTK_IS_HRULER(GTK_OBJECT(widget_list->data)) )
                        hruler = GTK_WIDGET(widget_list->data);
                if ( GTK_IS_VRULER(GTK_OBJECT(widget_list->data)) )
                        vruler = GTK_WIDGET(widget_list->data);
        }




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