Im writing a JavaFX-8 application and was wondering if it's possible to set min- or max-width of (e.g.) a Button to USE_PREF_SIZE
by css. The class Region
defines USE_PREF_SIZE
as Double.NEGATIVE_INFINITY
, but how to set negative Infinity in css?
The JavaFX Reference Guide defines -fx-min-width, -fx-pref-width, -fx-max-width
as <number>
and a <number>
is defined with the following regex [+|-]? [[0-9]+|[0-9]*"."[0-9]+]
So maybe it is impossible?
I have tried (for fun) to assign the java way for negative infinity -1.0/0.0
and the css-parser has accepted the value, but without the expected effect. May someone could explain why it doesnt prints a warning or an error?
I already know how to set USE_PREF_SIZE
by code and i also know the hack to set min, pref and max to the same value, but i want to do it in a css file the dynamic way.
Thanks in advance