diff options
author | Robert Jaros <rjaros@finn.pl> | 2017-10-19 13:48:03 +0200 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2017-10-19 13:48:03 +0200 |
commit | d17f27058f41f2dddd9fd5e88149ed55f9f7bf0c (patch) | |
tree | b475544b8af881fcb5f09a6fb12c82155b060976 /src/main/kotlin/pl/treksoft/kvision/Showcase.kt | |
parent | 94d1930aaf160d7271aabe97bf167a911391210b (diff) | |
download | kvision-d17f27058f41f2dddd9fd5e88149ed55f9f7bf0c.tar.gz kvision-d17f27058f41f2dddd9fd5e88149ed55f9f7bf0c.tar.bz2 kvision-d17f27058f41f2dddd9fd5e88149ed55f9f7bf0c.zip |
Form control: Radio
Unit tests
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/Showcase.kt')
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/Showcase.kt | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/Showcase.kt b/src/main/kotlin/pl/treksoft/kvision/Showcase.kt index 1eb0f319..afe49299 100644 --- a/src/main/kotlin/pl/treksoft/kvision/Showcase.kt +++ b/src/main/kotlin/pl/treksoft/kvision/Showcase.kt @@ -7,6 +7,8 @@ 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 @@ -69,6 +71,22 @@ class Showcase : ApplicationBase() { change = { e -> println("change" + self.value) } } + val radio = Radio(true, name = "radios", label = "Opcja 1", inline = true, + style = RADIOSTYLE.DANGER, extraValue = "o1") + val radio2 = Radio(false, name = "radios", label = "Opcja 2", rich = true, inline = true, + style = RADIOSTYLE.WARNING, extraValue = "o2") + val radio3 = Radio(false, name = "radios", label = "Opcja 3", inline = true, + style = RADIOSTYLE.PRIMARY, squared = true, extraValue = "o3") + root.add(radio) + root.add(radio2) + root.add(radio3) + radio.setEventListener<CheckBox> { + click = { e -> + println("rclick" + self.value) + } + change = { e -> println("rchange" + self.value) } + } + val text = Text(placeholder = "Pole formularza", maxlength = 5, label = "To jest pole") root.add(text) |