tornadofx使用checkbox控件

class LearnApp : App(LearnV::class)
class LearnV : View("learn") {
    val enableSounds = booleanProperty()
    override val root = form {
        fieldset {
            field("choosed:") {
                label(enableSounds)
            }
            field("Sound") {
                checkbox {
                    bind(enableSounds)
                    selectedProperty().addListener { _, _, isSoundEnabled ->

                    }
                }
            }
        }
        prefWidth=200.0
    }
}
相關文章
相關標籤/搜索