Forum Discussion

RandoCallissian's avatar
RandoCallissian
Reel Rookie
2 years ago
Solved

Can't set translation position for Label node

I'm trying to set the position of a Label node using a relative translation but it doesn't seem to work Is this expected for some reason that's not documented or that I missed in the documentation? ...
  • speechles's avatar
    2 years ago

    Your rectangle at top is using single quote ' instead of double quotes around the translation field.

    You also made a layout group. The label you are trying to adjust is within that first layout group. When items are within a layout group they will not be able to use translation. They will have to have another layout group nested for that label. Then that layout group you can adjust by the itemspacings.

    Put the label that has info tip into a second layout group all by itself. Then use 24 as the itemspacing for the first item in itemspacings (ie, itemspacings="[24]"). Make sure it is set to layoutDirection="vert" and you have addItemSpacingAfterChild="false". You want it to add the itemspacing before the child so it moves the 24 pixels down.

    https://developer.roku.com/docs/references/scenegraph/layout-group-nodes/layoutgroup.md

    You need to remember when inside a layout group individual items cannot have translations take effect. They will respect their layout groups they are within.