I wanna make a custom style for a text field. Firs custom property I would like to create round corners. I found here a solution but it's quite tricky for me -> https://stackoverflow.com/questions/49617760/how-to-set-rounded-corners-to-textarea-in-javafx. I'm a beginner when you talk about tornado fx How to make round corners for a text field in tornado fx with Kotlin, if you know an idea with type-safe DSL method.
Asked
Active
Viewed 277 times
1 Answers
0
For a textfield its quiet simple:
textfield("Sometext") {
style {
borderRadius += box(40.0.px)
}
}
Here I used inline style (just for this particular element). It's better to define it inside your Styles.kt in general.

kayf
- 87
- 1
- 11
-
This type of answer I looking for. Working great! – RaVortex May 06 '20 at 15:52