ui/gtk/list.c

changeset 495
1898cf608155
parent 494
15a0cfe47595
child 501
c0f108b1b709
--- a/ui/gtk/list.c	Sat Mar 08 22:06:25 2025 +0100
+++ b/ui/gtk/list.c	Sat Mar 08 22:10:11 2025 +0100
@@ -851,6 +851,17 @@
     return scroll_area;
 }
 
+void ui_listview_select(UIWIDGET listview, int index) {
+    GtkTreeSelection *sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(listview));
+    GtkTreePath *path = gtk_tree_path_new_from_indicesv(&index, 1);
+    gtk_tree_selection_select_path(sel, path);
+    //g_object_unref(path);
+}
+    
+void ui_combobox_select(UIWIDGET dropdown, int index) {
+    gtk_combo_box_set_active(GTK_COMBO_BOX(dropdown), index);
+}
+
 UIWIDGET ui_table_create(UiObject *obj, UiListArgs args) {
     UiObject* current = uic_current_obj(obj);
     

mercurial