Hi I'm new to Gtk. I'm trying to create a screen dynamically. The screen is to have frame with labels and comboboxes the number of witch is only known at run time. My GtkFrame has a GtkFixed widget on to witch I place the GtkLabel and GtkComboBox. when I execute the program some of the labels and comboboxes do not get displayed as I get an error message as
(try:15287): GLib-GObject-WARNING **: invalid cast from `GtkLabel' to `GtkFixed' (try:15287): Gtk-CRITICAL **: file gtkfixed.c: line 188 (gtk_fixed_put): assertion `GTK_IS_FIXED (fixed)' failed But this happens for the some particular positions in the list by which I populate the frame. Could some one please tell me as to why only at some particular point I get this error when I'm able to populate the remaining frame by the same code. I'd be really grateful if anyone could help me out. here is my code: for (c = 0, option = group->options; c < group->num_options; c++, option++) { dynamicLabel[I] = gtk_label_new (option->keyword); gtk_widget_show (dynamicLabel[I]); gtk_fixed_put (GTK_FIXED (dynamicFixed[d]), dynamicLabel[I], 10, k); gtk_widget_set_size_request (dynamicLabel[I], 120, 26); gtk_label_set_line_wrap (GTK_LABEL (dynamicLabel[I]), TRUE); dynamicCombo[I] = gtk_combo_box_new_text (); gtk_widget_show (dynamicCombo[I]); gtk_fixed_put (GTK_FIXED (dynamicFixed[d]), dynamicCombo[I], 150, k); gtk_widget_set_size_request (dynamicCombo[I], 250, 26); gtk_container_set_border_width (GTK_CONTAINER (dynamicCombo[I]), 1); for (e = 0; e < option->num_choices; e++) { option->choices[e].text); gtk_combo_box_append_text (GTK_COMBO_BOX (dynamicCombo[I]), option->choices[e].text); } gtk_combo_box_set_active (GTK_COMBO_BOX (dynamicCombo[I]), 0); g_signal_connect (dynamicCombo[I], "changed", G_CALLBACK (on_combo_changed), GINT_TO_POINTER (I)); I++; k = k + 40; } Thanking you in anticipation. Anne. -- ___________________________________________________________ Sign-up for Ads Free at Mail.com http://promo.mail.com/adsfreejump.htm _______________________________________________ gtk-list mailing list gtk-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-list