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

David Grieve david.grieve at oracle.com
Mon Jul 28 03:31:56 UTC 2014


Hi Werner,

Please file a bug. I'll have to update the parser to accept 'infinity' 
as a value.

On 7/24/14, 1:11 PM, Werner Lehmann wrote:
> 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