application/main.c

changeset 997
287b20e2a564
parent 990
38a48b756d80
--- a/application/main.c	Sat Dec 13 12:19:55 2025 +0100
+++ b/application/main.c	Sat Dec 13 12:37:41 2025 +0100
@@ -1254,7 +1254,14 @@
         //UiModel *model = ui_model(obj->ctx, UI_STRING, "Name", UI_STRING, "Email", -1);
         //ui_table(obj, .fill = TRUE, .varname = "persons", .model = model, .getvalue = person_getvalue, .onselection = list_onselection);
         //ui_model_free(obj->ctx, model);
-        ui_dropdown(obj, .varname = "persons", .getvalue = person_getvalue, .onactivate = list_onselection, .hexpand = TRUE, .hfill = TRUE);
+        //ui_dropdown(obj, .varname = "persons", .getvalue = person_getvalue, .onactivate = list_onselection, .hexpand = TRUE, .hfill = TRUE);
+        char *list[] = {
+            "test 1",
+            "test 2",
+            "test 3",
+            "test 4"
+        };
+        ui_dropdown(obj, .static_elements = list, .static_nelm = 4);
 
         ui_button(obj, .label = "Test 1");
         ui_newline(obj);

mercurial