Double.MAX_VALUE in CSS -fx-max-width?

Werner Lehmann lehmann at media-interactive.de
Thu Jul 24 17:11:47 UTC 2014


Hi,

since FX8 we have a styleable property -fx-max-width on Region. I'd like 
to use this to replace the FXML attribute

<Node maxWidth="Infinity"/>

with CSS

-fx-max-width: Infinity;

This is actually a notation to achieve the equivalent of this code:

   node.setMaxWidth(Double.MAX_VALUE);

Unfortunately it does not work like this in css. Normal values are 
accepted and seem to work but not this one. Maybe there is some special 
handing in the FXMLLoader to treat Infinity like MAX_VALUE? In any case, 
can this be done in css - maybe with a different workaround?

Rgds
Werner


More information about the openjfx-dev mailing list