0

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.

xyres
  • 20,487
  • 3
  • 56
  • 85
RaVortex
  • 1
  • 3

1 Answers1

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