ui/wpf/text.c

changeset 101
1c943d43fa81
parent 88
04c81be1c5a0
--- a/ui/wpf/text.c	Sun Jan 17 19:19:28 2016 +0100
+++ b/ui/wpf/text.c	Wed Jan 20 11:35:01 2016 +0100
@@ -116,3 +116,25 @@
     }
     UItextarea_remove(text->obj, begin, end);
 }
+
+
+UIWIDGET ui_textfield(UiObject *obj, UiString *value) {
+    UiContainer *container = uic_get_current_container(obj); 
+    UIWIDGET textfield = UItextfield(container, value ? value->value : NULL);
+    
+    if(value) {
+        // TODO
+    }
+    return textfield;
+}
+
+UIWIDGET ui_textfield_nv(UiObject *obj, char *varname) {
+    UiVar *var = uic_connect_var(obj->ctx, varname, UI_VAR_STRING);
+    if(var) {
+        UiString *value = var->value;
+        return ui_textfield(obj, value);
+    } else {
+        // TODO: error
+    }
+    return NULL;
+}

mercurial