Insert your text into a rectangle

Set a simple but responsive background to a text.

TextInrectangle TextInrectangle TextInrectangle TextInrectangle

Create a RectangleShapeGenerator Icon Rectangle and a LocalTextGenerator Icon Text Generator in your ElementTreeWorkspaceComponent Icon Element Tree :

01-CreateTextAndRectangle 01-CreateTextAndRectangle

The main idea is to make a connection between the size of the box and the size of the text using some Link Icon Link logic.

There are 2 ways to do that:

  1. The size of the rectangle depends on the size of the text

  2. The size of the text depends on the size of the rectangle


The rectangle depends on the text

  1. Right click over the size parameter of the TextRenderer Icon Text Renderer and create a Link Icon Link from the widht and the height

02-Linkfrom 02-Linkfrom

  1. Drag and drop the width and the height parameters of the rectangle in the empty LinkTarget Icon Link Target

03-DropTarget 03-DropTarget

  1. Right click on each LinkTarget Icon Link Target and add a DivideLinkModifier Icon Divide for the height and the width. Set the divide value equals to the width resolution of your compo for the width. Do the same for the height. If your compo is 1920x1080, the DivideLinkModifier Icon Divide should have a divide value to 1920 for witdh.

04-DiveLinkModifier 04-DiveLinkModifier

  1. Select the RectangleShapeGenerator Icon Rectangle , uncheck the scale->Linked paramters and link it’s placement to the Text.

05-UnlinkSizeAndConnect 05-UnlinkSizeAndConnect

  1. In order to create some margin, go to the LinkTarget Icon Link Target and add a OffsetLinkModifier Icon Offset

06-OffsetTheSizeOfRectangle 06-OffsetTheSizeOfRectangle


The text depends on the rectangle

Bit the same as the first method.

  1. To be more intuitive, it’s better to start this method with an anchor point for the text and rectangle at 0,0.

  2. Create a Link Icon Link from the width and the height placemenet paramters of the RectangleShapeGenerator Icon Rectangle

  3. Select your LocalTextGenerator Icon Text Generator and in it’s TextRenderer Icon Text Renderer , switch the width parameters from “auto” to “Word Wrap”, such as its Height parameters from auto to clamp.

8-TextSizeParam 8-TextSizeParam

  1. then, right click on the width and height parameter of the text and connec to -> width or Height

  2. Go to the placement options and link your text to the rectangle.

9-LinkTorectangle 9-LinkTorectangle


You can add some ShapeModifier Icon Shape Modifier :

07-FullLayers 07-FullLayers