jchildress
02/28/2017, 8:26 PMron
02/28/2017, 8:26 PMjchildress
02/28/2017, 8:26 PMedvin
02/28/2017, 8:26 PMnimakro
02/28/2017, 8:36 PMron
02/28/2017, 8:46 PMron
02/28/2017, 8:46 PMclass TryoutView : View() {
override val root=form {
fieldset {
children.add(mybuttonbar {
button("OK") {
ButtonBar.setButtonData(this, ButtonBar.ButtonData.OK_DONE)
}
button("Cancel"){
ButtonBar.setButtonData(this, ButtonBar.ButtonData.CANCEL_CLOSE)
}
button("Apply"){
ButtonBar.setButtonData(this, ButtonBar.ButtonData.APPLY)
}
})
}
}
}
ron
02/28/2017, 8:47 PMfun Fieldset.mybuttonbar(op : ButtonBar.() -> Unit) : ButtonBar {
val bar = ButtonBar()
op?.invoke(bar)
return bar
}
ron
02/28/2017, 8:48 PMjchildress
02/28/2017, 8:53 PMjchildress
02/28/2017, 8:53 PMron
02/28/2017, 8:53 PMron
02/28/2017, 9:05 PMron
02/28/2017, 9:05 PMedvin
02/28/2017, 9:37 PMedvin
02/28/2017, 9:37 PMron
02/28/2017, 9:37 PMedvin
02/28/2017, 9:38 PMedvin
02/28/2017, 9:39 PMbutton
builder so it can take a ButtonData typeron
02/28/2017, 9:39 PMedvin
02/28/2017, 9:39 PMButtonBar
directly.ron
02/28/2017, 9:39 PMedvin
02/28/2017, 9:39 PMbuttonbar
builder on Form so it will create a default ButtonBar?ron
02/28/2017, 9:40 PMron
02/28/2017, 9:40 PMedvin
02/28/2017, 9:41 PMron
02/28/2017, 9:41 PMron
02/28/2017, 9:42 PMedvin
02/28/2017, 9:47 PMron
02/28/2017, 9:47 PM