B4J Question Access to AnchorPane Transforms

bdunkleysmith

Active Member
Licensed User
Longtime User
Yes I know I should be using the Internal Designer, but I'm working with a legacy Scene Builder layout.

I would like to programmatically adjust some of the "Transform" parameters of an AnchorPane which are available in Scene Builder, but not exposed in B4J:

Anchorpane.png


Specifically I would like to programmatically adjust Scale X, Scale Y and Translate Y.

Is it possible?
 

Daestrum

Expert
Licensed User
Longtime User
You should be able to use the JavaObject library to achieve what you want.

B4X:
Dim anchorPaneJO as JavaObject = yourAnchorPane

anchorPaneJO.RunMethod("SetScaleX",array(2.0d))  ' 2.0d as it wants a double
...
anchorPaneJO.RunMethod("setTranslateY",array(100.0d)) ' translate it +100
 
Upvote 0
Top