Using my javasax (CSS) CSS, trying to get a dynamic scrollpoint in the application. Scroll down my CSS Looks like this:
.scroll-fane {-fx-width: 80%; -fx-height: 80%; -fx-background-color: # FF3333; }
The color works, but does not have the size property, if I open the CSS in the JavaFX Visual Builder, then it does not show the height and width lines at all.
I think I'm missing some pretty basically, but I can not seem to know this.
As far as I know that you -fx-width / -fx-height
and you can not use percent values for it. The width and height of the elements are read-only. You -fx-pref-width
, -fx-pref-height
, -fx-max-width
, -fx can be set -min-width
, -fx-max-height
and -fx to adjust the size of Java FX elements -min-height
.
Check out the CSS styles to see if it's possible.
If you want size as a percentage, you probably need to bind the size of another property.
As an example:
myView.prefWidthProperty (). Dam (myOtherView.widthProperty (). Times (0.75));
There is another post about percentage values with the use of GridLayout
No comments:
Post a Comment