diff -r 55fb6bad549d -r 96a055be7f0b application/main.c --- a/application/main.c Fri Nov 29 22:02:38 2024 +0100 +++ b/application/main.c Sat Nov 30 20:13:09 2024 +0100 @@ -113,13 +113,18 @@ ui_close(event->obj); } +void action_dialog_onactivate(UiEvent *event, void *userdata) { + printf("textfield activate\n"); + ui_close(event->obj); +} + void action_toolbar_dialog(UiEvent *event, void *userdata) { UiObject *dialog = ui_dialog_window(event->obj, .title = "Dialog Window", .lbutton1 = "Cancel 1", .lbutton2 = "Btn2", .rbutton3 = "Btn3", .rbutton4 = "Login 4", .onclick = action_dialog_button, .default_button = 4, .show_closebutton = UI_OFF); ui_vbox(dialog, .margin = 10, .spacing = 10) { ui_label(dialog, .label = "Enter password:"); - ui_passwordfield(dialog, .varname = "password"); + ui_passwordfield(dialog, .varname = "password", .onactivate = action_dialog_onactivate); } ui_show(dialog);