QUICK REFERENCE: CONTROL: TEXT

Using the "halo" you can define the position and size of this control.

Clicking in the little button "Menu" of its "halo", you have many other options for the customization of the control Text. We will talk about some one.

Clicking text color (not change color) you will see a new window:

To change the color only click that you like more.

You can change the font. But only can change the syze (here) if using the default font (BitstreamVeraSans). The recomendation is the use of the method setScaleFactor, like we did at previous lesson.

The letters can be bolded, underlined etc.

The text is inside a box. You can change the margins (3 options) clicking over "Margins".

Auto-Fit enables the following feature: if the text contents changes, then the bounds will be adjusted to fit the minimum rectangle that encloses the text.

Wrapping, the text will be wrapped at word boundaries based on the composition width (text margins).

Returning to the Menu options: to change the color of the background, choose change color.

The Class Text has some methods that can be used inside an script:


setCharacters:'abcdef'.


getCharacters.


setNumericValue:n.


getNumericValue.


setScaleFactor: n

This method is the best option to change the size of the letters.


show


hide


PREVIOUS LESSON NEXT LESSON
TABLE OF CONTENTS HOMEPAGE