简体   繁体   中英

JavaFx & TornadoFX changing margin in CSS or TypeSafeCSS

Can i set hbox constraints(margins)in TypeSafeCss in TornadoFx or Css for JavaFx?

hbox {
  textfield {
    hboxConstraints {
      margin = Insets(5.0)
    }
  }
}

How to do this with CSS or TypeSafeCSS without using padding .

As of the information of now thx to @fabian this is not possible in JavaFx

It is not possible so far.

Because TornadoFx depends on JavaFx If JavaFx cant do it also TornadoFx cant.

Yes it might be possible with TornadoFx with a lot of tricks and tweaks but i/you would have to touch the JavaFx source code.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM