application/main.c

changeset 936
d40a72210be8
parent 921
c2b318b93062
child 937
06e03c7e39db
equal deleted inserted replaced
935:d95e8723545c 936:d40a72210be8
1223 UiList *list = ui_list_new(obj->ctx, "persons"); 1223 UiList *list = ui_list_new(obj->ctx, "persons");
1224 ui_list_append(list, &person1); 1224 ui_list_append(list, &person1);
1225 ui_list_append(list, &person2); 1225 ui_list_append(list, &person2);
1226 1226
1227 ui_grid(obj, .margin = 10, .columnspacing = 10, .rowspacing = 10, .fill = TRUE) { 1227 ui_grid(obj, .margin = 10, .columnspacing = 10, .rowspacing = 10, .fill = TRUE) {
1228 UiModel *model = ui_model(obj->ctx, UI_STRING, "Name", UI_STRING, "Email", -1); 1228 //UiModel *model = ui_model(obj->ctx, UI_STRING, "Name", UI_STRING, "Email", -1);
1229 ui_table(obj, .fill = TRUE, .varname = "persons", .model = model, .getvalue = person_getvalue, .onselection = list_onselection); 1229 //ui_table(obj, .fill = TRUE, .varname = "persons", .model = model, .getvalue = person_getvalue, .onselection = list_onselection);
1230 ui_model_free(obj->ctx, model); 1230 //ui_model_free(obj->ctx, model);
1231 } 1231 ui_combobox(obj, .varname = "persons", .getvalue = person_getvalue, .onactivate = list_onselection);
1232 }
1233
1232 1234
1233 1235
1234 1236
1235 ui_show(obj); 1237 ui_show(obj);
1236 } 1238 }

mercurial