application/main.c

changeset 1000
56faeb1772da
parent 997
287b20e2a564
child 1004
8b8d4f8af38e
--- a/application/main.c	Sat Dec 13 12:51:57 2025 +0100
+++ b/application/main.c	Sat Dec 13 12:52:38 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