edvin
06/13/2017, 10:10 PMBoom!▾
edvin
06/13/2017, 10:16 PMkasrasadeghi
06/14/2017, 1:33 AMjchildress
06/14/2017, 1:34 AMkasrasadeghi
06/14/2017, 1:34 AMPasted image at 2017-06-13, 8:34 PM▾
jchildress
06/14/2017, 1:34 AMkasrasadeghi
06/14/2017, 1:34 AMjchildress
06/14/2017, 1:35 AMRoman Ivanov
06/14/2017, 3:44 AMedvin
06/14/2017, 4:27 AMRoman Ivanov
06/14/2017, 4:37 AMdata class ServerInfo(
val name: String,
val mainPort:Int,
val adminPort: Int,
val hostName: String
)
class ServerPeekerView : View() {
val mainController by inject<MainController>()
val servers = serversInfo.observable()
val server = SimpleObjectProperty<ServerInfo>()
override val root = vbox {
hbox {
minWidth = 400.0
spacing = 10.0
label("Server")
combobox(server, servers) {
minWidth = 200.0
hgrow = Priority.ALWAYS
cellFormat {
graphic = label(it.name)
}
}
button("Connect") {
action {
mainController.currentServer = server.value
}
}
}
}
}
Roman Ivanov
06/14/2017, 4:37 AMbuttonCell.style { }
exception thrownRoman Ivanov
06/14/2017, 4:40 AMedvin
06/14/2017, 6:02 AMbuttonCell
on a JavaFX ComboBox
is null by default, that's why. You can control this in a stylesheet instead, but I wonder why the text is white. I see the same. Will get back to you later today, gotta run now.edvin
06/14/2017, 6:04 AMedvin
06/14/2017, 6:05 AMText
node 🙂Roman Ivanov
06/14/2017, 7:22 AMmikehearn
06/14/2017, 8:37 AMedvin
06/14/2017, 8:38 AMthomasnield
06/14/2017, 4:12 PMthomasnield
06/14/2017, 4:41 PMedvin
06/14/2017, 8:33 PMedvin
06/14/2017, 8:36 PMuseTextField
or anything like that before cellFormat, or perhaps combine it with cellDecorator
? Need some help in pinpointing the issue.edvin
06/14/2017, 8:41 PMapatrida
06/14/2017, 9:01 PMedvin
06/14/2017, 9:02 PMapatrida
06/14/2017, 9:02 PMapatrida
06/14/2017, 9:02 PMapatrida
06/14/2017, 9:03 PM