In C Language, how is it possible to pass the values in ComboBox to GtkTreeView? We have tried this code, but we do not know where to write the ids of ComboBox. What signals should be used in ComboBox?
void on_btn_car_order_clicked(GtkButton *button, gpointer *user_data){
GtkTreeIter iter;
GtkTreeView *treeview_payment1 = GTK_TREE_VIEW(user_data);
GtkListStore *liststore1 = GTK_LIST_STORE(gtk_tree_view_get_model(treeview_payment1));
gtk_list_store_append(liststore1, &iter);
gtk_list_store_set(liststore1, &iter, 0, "asdas" , 1, 1.0,2, 10.0, -1);
gtk_widget_hide (GTK_WIDGET(detail_window));
gtk_widget_show(listree_window);
}
GtkTreeView GtkWindow with ComboBox
Thank you, Best regards, Shak
if you want to pass customized data during onClick signal then connect using
https://developer.gnome.org/gobject/stable/gobject-Signals.html. and generally, for connecting signals, you can manually connect it using g_connect as mostly during your program you might want to modify data's which will be stored in your struct so instead of using glade for it, you can manually connect.
#suggestions(if your actual program is gonna look like this). you could finish the above program in a single main window by adding an Add button to "listtree_window" window and making "main_window" a dialog box.