aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/pl/treksoft/kvision/Showcase.kt
diff options
context:
space:
mode:
authorRobert Jaros <rjaros@finn.pl>2017-10-19 15:22:42 +0200
committerRobert Jaros <rjaros@finn.pl>2017-10-19 15:22:42 +0200
commitd591af011d040d8ce2684f044b594d28ab358ef9 (patch)
tree89ec92f3d72d535dc6507b68b70ae326797b28eb /src/main/kotlin/pl/treksoft/kvision/Showcase.kt
parent6caae545b7961f9ba5f136d38730ecf026ab7fbb (diff)
downloadkvision-d591af011d040d8ce2684f044b594d28ab358ef9.tar.gz
kvision-d591af011d040d8ce2684f044b594d28ab358ef9.tar.bz2
kvision-d591af011d040d8ce2684f044b594d28ab358ef9.zip
Form controls: TextArea
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/Showcase.kt')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/Showcase.kt23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/Showcase.kt b/src/main/kotlin/pl/treksoft/kvision/Showcase.kt
index afe49299..f1406505 100644
--- a/src/main/kotlin/pl/treksoft/kvision/Showcase.kt
+++ b/src/main/kotlin/pl/treksoft/kvision/Showcase.kt
@@ -4,14 +4,7 @@ import pl.treksoft.kvision.basic.Label
import pl.treksoft.kvision.core.*
import pl.treksoft.kvision.dropdown.DD.*
import pl.treksoft.kvision.dropdown.DropDown
-import pl.treksoft.kvision.form.CHECKBOXSTYLE
-import pl.treksoft.kvision.form.CheckBox
-import pl.treksoft.kvision.form.INPUTSIZE
-import pl.treksoft.kvision.form.RADIOSTYLE
-import pl.treksoft.kvision.form.Radio
-import pl.treksoft.kvision.form.TEXTINPUTTYPE
-import pl.treksoft.kvision.form.Text
-import pl.treksoft.kvision.form.TextInput
+import pl.treksoft.kvision.form.*
import pl.treksoft.kvision.html.*
import pl.treksoft.kvision.html.TAG.DIV
import pl.treksoft.kvision.html.TAG.H1
@@ -90,6 +83,20 @@ class Showcase : ApplicationBase() {
val text = Text(placeholder = "Pole formularza", maxlength = 5, label = "To jest pole")
root.add(text)
+ val textareainput = TextAreaInput(cols = 5, rows = 2, placeholder = "...", value = "To jest tekst\nTo jest <b>te</b></textarea>kst2")
+ root.add(textareainput)
+
+ val textarea = TextArea(cols = 5, rows = 2, placeholder = "...", value = "To jest tekst\nTo jest <b>te</b></textarea>kst2", label = "Pole długie")
+ root.add(textarea)
+ textarea.setEventListener<TextArea> {
+ input = { e ->
+ println("ta i" + self.value)
+ }
+ change = { e ->
+ println("ta c" + self.value)
+ }
+ }
+
val dd = DropDown("Dropdown", listOf("abc" to "#!/x", "def" to "#!/y"), "flag")
root.add(dd)
dd.setEventListener<DropDown> {