MENU
- TextField
- ➜ TextField SetText
- ➳ TextField: adapt Text
- ➽ TextField: set And AdaptText
- ↨ TextField: vertical Align
TextField
The textField category allows you to inject code in order to dynamize the textFields components.
Create a TextField field:
SetText
The setText method adds text to a textField without changing the text size (more info).
Select the textField and click on “➜ setText”. “setText” injects the textField’s dynamization code.
Result:
You will notice that the text has overflowed the textField area. The adaptText method will allow you to adapt your text according to its container.
AdaptText
The adaptText method allows you to adjust the font of your text (more info).
Select the textField and click on “➳ adaptText”
In order for the adaptText function to work, you must specify the minimum font size allowed, as well as the size of the textField.
Result:
SetAndAdaptTex
The setAndAdaptText method adds and adapts your texts directly.
Select the textField and click on “➽ setAndAdaptText” .
Enter the desired minimum font size, as well as the size of the textField (more info), as displayed in the example below:
ADventori.Display.setAndAdaptText(this.textField_2,ADventori.data.wording,10,246,147);
VerticalAlign
The verticalAlign method centers your text vertically (more info).
Select the textField and click on “↨ verticalAlign”.
The following code is injected:
ADventori.Display.verticalAlign(this.textField_2,MaxHeight,Yposition);
Fill in the settings:
ADventori.Display.verticalAlign(this.textField_2,147,69);
Result: