diff -r b8e41d42f400 -r ef60d527c066 application/main.c --- a/application/main.c Thu Dec 12 16:34:39 2024 +0100 +++ b/application/main.c Thu Dec 12 23:23:09 2024 +0100 @@ -490,9 +490,18 @@ printf("action_button\n"); } +typedef struct WData { + UiString *path; +} WData; + void application_startup(UiEvent *event, void *data) { UiObject *obj = ui_window("Test", NULL); + WData *wdata = ui_malloc(obj->ctx, sizeof(WData)); + wdata->path = ui_string_new(obj->ctx, NULL); + obj->window = wdata; + + /* ui_grid(obj, .margin = 10) { ui_button(obj, .label = "Test Button", .onclick = action_button); ui_newline(obj); @@ -528,8 +537,15 @@ } + */ + + //ui_textfield(obj, .varname = "textfield"); + //ui_textfield(obj, .varname = "textfield2"); + ui_path_textfield(obj, .value = wdata->path, .hfill = TRUE, .hexpand = TRUE); + + ui_set(wdata->path, "/test/path/string"); ui_show(obj);