summaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/Showcase.kt1
-rw-r--r--src/main/kotlin/pl/treksoft/kvision/dropdown/DropDown.kt2
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()
}
}