diff options
author | Robert Jaros <rjaros@finn.pl> | 2017-09-15 13:08:34 +0200 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2017-09-15 13:08:34 +0200 |
commit | 3d8cac6ab126a5fcb2bc8c0fed864afdaa4349ea (patch) | |
tree | 0b9c05db4e9c254a12de54d8e75bcb84cd4d712b /src/main/kotlin/pl/treksoft/kvision/Showcase.kt | |
parent | 04e33bba30b821dc6634cd049798eb944b03717f (diff) | |
download | kvision-3d8cac6ab126a5fcb2bc8c0fed864afdaa4349ea.tar.gz kvision-3d8cac6ab126a5fcb2bc8c0fed864afdaa4349ea.tar.bz2 kvision-3d8cac6ab126a5fcb2bc8c0fed864afdaa4349ea.zip |
Support child nodes of dropdown component
Diffstat (limited to 'src/main/kotlin/pl/treksoft/kvision/Showcase.kt')
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/Showcase.kt | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/Showcase.kt b/src/main/kotlin/pl/treksoft/kvision/Showcase.kt index 6275fe88..9ab1ac0e 100644 --- a/src/main/kotlin/pl/treksoft/kvision/Showcase.kt +++ b/src/main/kotlin/pl/treksoft/kvision/Showcase.kt @@ -47,6 +47,13 @@ class Showcase : ApplicationBase() { hiddenBsDropdown = { e -> println("hidden" + e.detail) } } + val dd3 = DropDown("Dropdown3", icon = "file") + dd3.add(Tag(TAG.H4, "ABC")) + dd3.add(Button("To jest button")) + dd3.add(Image(Img("kotlin.png"))) + root.add(dd3) + + val p = Tag(TAG.P, "To jest prawo", align = ALIGN.RIGHT) p.title = "Tytuł" root.add(p) @@ -68,7 +75,11 @@ class Showcase : ApplicationBase() { val button = Button("To jest przycisk FA", "fa-flag", BUTTONSTYLE.DANGER) button.setEventListener<Button> { - click = { _ -> println(self.text) } + click = { _ -> + println(self.text) + dd3.text = "Zmiana" + dd3.style = BUTTONSTYLE.WARNING + } } root.add(button) val button2 = Button("To jest przycisk", "flag", BUTTONSTYLE.DANGER) |