Re: Pass more widgets as gpointer.



Hi All.

Thanks for all ideas, to this problem. I figured out how to pass more
widgets in an array, which is IMHO the best way to do it. Just for
reference, the following snippet.

"Packing" the widgets pointers in the array
 GtkWidget * *data;
 data = malloc(sizeof(GtkWidget *)*3);
 data[0]=spinbutton;
 data[1]=combobox;
 data[2]=check_hidden
And "unpacking" them
GtkWidget * *array=(GtkWidget **)data;
Then you just need to type cast the elements of the array:
for instance
 gtk_combo_box_get_active((GtkComboBox *)array[1])



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