diff options
author | Robert Jaros <rjaros@finn.pl> | 2017-09-15 13:14:46 +0200 |
---|---|---|
committer | Robert Jaros <rjaros@finn.pl> | 2017-09-15 13:14:46 +0200 |
commit | 4a7952db63e9bcb0cfc8683327cc772b6e9706d2 (patch) | |
tree | a8c7d3ec8cdd169c4cd5bfd5d6cb467aab172723 /src/main/kotlin | |
parent | 3d8cac6ab126a5fcb2bc8c0fed864afdaa4349ea (diff) | |
download | kvision-4a7952db63e9bcb0cfc8683327cc772b6e9706d2.tar.gz kvision-4a7952db63e9bcb0cfc8683327cc772b6e9706d2.tar.bz2 kvision-4a7952db63e9bcb0cfc8683327cc772b6e9706d2.zip |
Turn off toggle of disabled dropdown
Diffstat (limited to 'src/main/kotlin')
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/Showcase.kt | 1 | ||||
-rw-r--r-- | src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/main/kotlin/pl/treksoft/kvision/Showcase.kt b/src/main/kotlin/pl/treksoft/kvision/Showcase.kt index 9ab1ac0e..258e870d 100644 --- a/src/main/kotlin/pl/treksoft/kvision/Showcase.kt +++ b/src/main/kotlin/pl/treksoft/kvision/Showcase.kt @@ -79,6 +79,7 @@ class Showcase : ApplicationBase() { println(self.text) dd3.text = "Zmiana" dd3.style = BUTTONSTYLE.WARNING + dd3.disabled = true } } root.add(button) diff --git a/src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt b/src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt index f2784e5a..7ee9a28f 100644 --- a/src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt +++ b/src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt @@ -81,7 +81,7 @@ open class DropDown(text: String, elements: List<StringPair>? = null, icon: Stri init { button.setEventListener { click = { - toggle() + if (!button.disabled) toggle() } } |