GMan Well-Known Member Licensed User Longtime User Aug 31, 2017 #1 Is it possible to turn a button for i.e. 40° (this kind: /) ?
K keirS Well-Known Member Licensed User Longtime User Aug 31, 2017 #2 Yes you can use the -fx-rotate attribute for the button style. Upvote 0
stevel05 Expert Licensed User Longtime User Aug 31, 2017 #3 Or set in code with JavaObject: B4X: Dim JO As JavaObject = Button JO.RunMethod("setRotate",Array(40.00)) This rotates around the centre of the node. https://docs.oracle.com/javase/8/javafx/api/javafx/scene/Node.html#setRotate-double- See the documentation for an alternative that allows setting the pivot point. Upvote 0
Or set in code with JavaObject: B4X: Dim JO As JavaObject = Button JO.RunMethod("setRotate",Array(40.00)) This rotates around the centre of the node. https://docs.oracle.com/javase/8/javafx/api/javafx/scene/Node.html#setRotate-double- See the documentation for an alternative that allows setting the pivot point.
GMan Well-Known Member Licensed User Longtime User Sep 1, 2017 #4 stevel05 said: Or set in code with JavaObject: B4X: Dim JO As JavaObject = Button JO.RunMethod("setRotate",Array(40.00)) This rotates around the centre of the node. https://docs.oracle.com/javase/8/javafx/api/javafx/scene/Node.html#setRotate-double- See the documentation for an alternative that allows setting the pivot point. Click to expand... I tried this: B4X: Dim JO2 As JavaObject = Gleis2Button JO2.RunMethod("setRotate",Array(40.00)) but the Button ist still -, not / Last edited: Sep 1, 2017 Upvote 0
stevel05 said: Or set in code with JavaObject: B4X: Dim JO As JavaObject = Button JO.RunMethod("setRotate",Array(40.00)) This rotates around the centre of the node. https://docs.oracle.com/javase/8/javafx/api/javafx/scene/Node.html#setRotate-double- See the documentation for an alternative that allows setting the pivot point. Click to expand... I tried this: B4X: Dim JO2 As JavaObject = Gleis2Button JO2.RunMethod("setRotate",Array(40.00)) but the Button ist still -, not /
stevel05 Expert Licensed User Longtime User Sep 1, 2017 #5 Is it rotating at all? The angle needs to be -40.00 to display like / Upvote 0
GMan Well-Known Member Licensed User Longtime User Sep 1, 2017 #6 No, doesnt turn any degree Upvote 0
stevel05 Expert Licensed User Longtime User Sep 1, 2017 #7 Try this: Attachments Rotate.zip 1.9 KB · Views: 220 Upvote 0
GMan Well-Known Member Licensed User Longtime User Sep 1, 2017 #8 Thanks, that works and shows again: I am a "Stiersel" ;-) Placed the code example at the wrong place Upvote 0