diff -r 1b321a0c624f -r 3380100e20f5 application/main.c --- a/application/main.c Sun Feb 18 19:55:56 2024 +0100 +++ b/application/main.c Thu Feb 22 22:25:53 2024 +0100 @@ -73,12 +73,15 @@ UiIcon *icon = NULL; static void* list_getvalue(void *elm, int col) { + /* if(col == 0) { if(!icon) { icon = ui_icon("folder", 24); } return icon; } + */ + char *str = elm; return col == 1 ? str : "x"; } @@ -115,9 +118,9 @@ ui_textfield(obj, .value = doc->str1); ui_newline(obj); - UiModel *model = ui_model(obj->ctx, UI_ICON_TEXT, "Col 1", UI_STRING, "Col 2", -1); - model->getvalue = list_getvalue; - ui_table(obj, .hexpand = true, .vexpand = true, .colspan = 2, .varname = "list", .model = model); + //UiModel *model = ui_model(obj->ctx, UI_ICON_TEXT, "Col 1", UI_STRING, "Col 2", -1); + //model->getvalue = list_getvalue; + ui_listview(obj, .hexpand = true, .vexpand = true, .colspan = 2, .varname = "list", .getvalue = list_getvalue); } ui_show(obj);