• No results found

Working with Components

3. On the Insertion view, click Add ( ) to add the number of items you want to insert with each selection

4.2.7 Using text components

This category contains components for displaying labels and allowing users to type text into your model.

Text components let you customize your model. Not only can you insert static text to identify areas and elements of your model, but you can also link the text components to cells in the embedded spreadsheet to dynamically change the text displayed in the model based on the cell value or formula result. In addition, formulas can contain HTML code to increase formatting options.

The software includes the following text components:

Input text area

The input text area can display multiple lines of text that the user can edit during runtime.

Label

The label component lets you add a box of text to the model. For example, you can use label components to create titles, subtitles, explanations, help, and more. Label text cannot be changed by the user.

Input text

The input text component can display a line of text that the user can edit during runtime.

Related Topics

•To configure component properties

4.2.7.1 Text general properties

Use the following table as a guide for setting properties for text components on the General view. The available options vary depending on the type of component.

Description Option

Select this option to display text from a cell in the embedded spreadsheet.

Changes to the data in the cell are reflected in the component. You can use this option to set dynamic labels by defining formulas that update based on data or user selections in the model.

Link to Cell

For a label component linked to a cell, you can select this option to apply the formatting from the embedded spreadsheet to the text in the model.

Use Spreadsheet For-matting

Select this option to manually type text to display in the component.

Enter Text

Description Option

Select this option to enable the use of HTML codes for text formatting for a label or input text area. Several HTML codes are supported:

• Anchor tag: <a>

• Bold tag: <b>

• Break tag: <br>

• Font tag: <font>

• Image tag: <img>

• Italic tag: <i>

• List item tag: <li>

• Paragraph tag: <p>

• Text format tag: <textformat>

• Underline tag: <u>

Note:

If you intend to export your model to PowerPoint and include a link in the text with HTML formatting, you must include target="_blank" in your link tag so PowerPoint opens the link in a new window. For example, <a href="http://www.google.com"target="_blank">. If you do not include the target setting, users can open the link in PowerPoint only if they right-click the link and select Open in new window.

Enable HTML Format-ting

Select this checkbox to insert the default text into the destination cell when the model first opens during runtime.

Insert Data on Load

This option specifies where the text is inserted in the spreadsheet.

Note:

The destination cells must be empty.

Destination

Related Topics

•To configure component properties

•Text behavior properties

•Text appearance properties

4.2.7.2 Text behavior properties

Use the following table as a guide for setting the Behavior properties for text components. The available options vary depending on the type of component.

Description Option

Common Tab

If this option is selected, the input is treated as text strings. Text is not available for use in mathematical formulas or calculations.

If this option is not selected, numerical input for the component can be used for calculations or formulas.

Treat All Input As Text

Select this option for an input text component where users type a password. Typed characters are displayed as asterisks (*).

Enable Password Protection

Use this option to limit the number of characters that users can enter.

Maximum Number of Charac-ters

This option allows you to control the set of characters that users can type in an input text component. By default, all characters are allowed. For more information about defining allowed characters, seeRestricting characters in text-based components.

Characters Allowed

Description Option

If the text exceeds the width of the text area, a scroll bar allows users to scroll through the text. Select one of the following options:

Description Option

The horizontal scroll bar is always visible.

On

The horizontal scroll bar is never available.

Off

The horizontal scroll bar appears only when the text exceeds the width of the text area.

Auto Horizontal Scroll Bar

If the text exceeds the height of the text area, a scroll bar allows users to move through the text. Select one of the following options:

Description Option

The vertical scroll bar is always visible.

On

The vertical scroll bar is never available.

Off

The vertical scroll bar appears only when the text exceeds the height of the text area.

Auto Vertical Scroll Bar

This option allows you to specify conditions that control when the text component appears in the model. For more information about using dynamic visibility, seeManaging the visibility of components.

Dynamic Visibility

Animations and Effects Tab

Configure an animated entry effect for the appearance of the component. This option is useful for components with dynamic visibility.

Select an entry effect from the Type list and specify how long the effect lasts in the Duration (seconds) box.

Entry Effect

Related Topics

•To configure component properties

• Text general properties

•Text appearance properties

4.2.7.2.1 Restricting characters in text-based components

By default, input text components allow users to enter any character. You can prevent users from entering certain characters in an input text component if necessary. For instance, if users need to type a name, you can disable numerical characters, punctuation, and special characters.

To limit the allowed characters:

1. On the "Properties" panel, click Behavior > Common.

2. In the Characters Allowed box, type the allowed and not allowed characters or click the Cell Selector