application/demo_bindings.c

changeset 911
c8e1d40eeab6
parent 909
28c2a28026ab
child 912
06c37c12d149
--- a/application/demo_bindings.c	Tue Nov 18 13:52:49 2025 +0100
+++ b/application/demo_bindings.c	Tue Nov 18 15:41:45 2025 +0100
@@ -97,7 +97,7 @@
         ui_llabel(obj, .varname = "name", .hfill = TRUE, .vfill = TRUE);
         ui_newline(obj);
         
-        ui_listview(obj, .height = 200, .varname = "doclist", .colspan = 2, .onactivate = switch_document, .getvalue = doclist_get_value, .colspan = 2, .hfill = TRUE);
+        ui_combobox(obj, .varname = "doclist", .colspan = 2, .onactivate = switch_document, .getvalue = doclist_get_value, .colspan = 2, .hfill = TRUE);
         ui_newline(obj);
         
         ui_frame(obj, .label = "Document", .colspan = 2, .fill = TRUE) {
@@ -117,7 +117,9 @@
     Document *doc = ui_list_get(wdata->doclist, 0);
     ui_attach_document(obj->ctx, doc);
     
-    //ui_list_setselection(wdata->doclist, 0);
+    ui_list_setselection(wdata->doclist, 0);
+    UiListSelection sel = wdata->doclist->getselection(wdata->doclist);
+    int x = sel.rows[0];
     
     
     ui_show(obj);

mercurial