javafx - How can I rotate a label -


in javafx 8 specify css rotate label instead of text going left right, goes bottom top.

how can that?

any node can have it's rotation styled via css using -fx-rotate css attribute.

this angle of rotation in degrees. 0 degrees @ 3 o'clock (directly right). angle values positive clockwise. rotation center.

so in code or fxml can have:

label.setstyle("vertical"); 

and in css stylesheet can define:

.vertical { -fx-rotate: -90; } 

also note james_d's answer suggestion of wrapping label in group account rotation when performing layout bounds calculations.


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -