ui/gtk/list.c

changeset 494
15a0cfe47595
parent 490
0206161e92d5
child 495
1898cf608155
--- a/ui/gtk/list.c	Fri Mar 07 22:41:45 2025 +0100
+++ b/ui/gtk/list.c	Sat Mar 08 22:06:25 2025 +0100
@@ -352,6 +352,15 @@
     return view;
 }
 
+void ui_listview_select(UIWIDGET listview, int index) {
+    GtkSelectionModel *model = gtk_list_view_get_model(GTK_LIST_VIEW(listview));
+    gtk_selection_model_select_item(model, index, TRUE);
+}
+    
+void ui_combobox_select(UIWIDGET dropdown, int index) {
+    gtk_drop_down_set_selected(GTK_DROP_DOWN(dropdown), index);
+}
+
 UIWIDGET ui_table_create(UiObject *obj, UiListArgs args) {
     UiObject* current = uic_current_obj(obj);
     

mercurial