Dynamic Texts

Introduction

Hello and welcome to a new guide on how to best use Movicon.NExT™.

In this technote we are going to show you how to animate text using the Animated Text object from the Toolbox library.

Text Animation

The most convenient way to animate text in Movicon.NExT is to use the Animated Text object from the Toolbox library or the Border Color Animation from those listed under Animations offered by Movicon.NExT.
We will now show you how to create animated text as previously described.

Example

In the example we are going to create a screen with a Display object, which will be assigned to a tag whose value will command the animation, an Animated Text object, and a Text Box object with Border Color Animation.
We will also use the powerful features of the String Resource to associate String ID to the objects instead of text.

Tag Creation

First, start the Movicon.NExT platform up in design mode and create, or load, a project.
Then, create a tag to be used to animate the objects in this way:

Once you have finished configuring the tags, save the project by clicking on the Save All button in the Movicon.NExT editor toolbar.

Screen Creation

Next create a screen:

Now that you have created the screen, change the project’s properties by inserting the screen we have just created as the project’s startup screen. To do this:

Once you have finished, click on the Save button on the toolbar to save the project.

Check that the Main screen is open, click on the Toolbox tab on the far right next to the properties window to open the Toolbox library offered by Movicon.NExT.
Go to the Texts folder, select the Text box and Animated Text object, then drag and drop them onto the screen. Then go to the Displays folder and do the same with the Display object.

Assign the Var1 tag to the Display and Animated Text objects by entering it in their Tag properties or by dragging it from the project tree and dropping it on each one of the objects.

We shall next configure the Display object. First, select it and then open its properties window:

Now let’s proceed with configuring the Animated Text object. First select it then open its properties window:

Let’s go to the Text Box object. Select it and change its font size as done with the previous object, then:

Save the project by clicking on the Save All icon on the Movicon.NExT editor’s toolbar.

Texts table configuration

We shall now go on to configure the texts table.
Select and double-click the Texts Resource on the project tree to open it.
Add two languages, for example English (United States) and Italian in this way:

Now add the String ID:

Repeat this procedure to insert the V1, V2 and V3 string IDs.

Change Language buttons configuration

Open the Main screen and then open the Toolbox library again. Go to the Buttons folder and then the Standard folder and drag and drop a Standard Metro Style button on the screen.
With the button selected, open it properties window and enter the ENG string in the Text property field.
Still with the ENG button selected, click on the Commands tab at the bottom of the editor.
Open the commands panel and select to add the Languages command to the button’s associated command list.
Configure the command in the tab’s far right by selecting the en-US option in the Language (Culture Name) property field.

Make a duplicate of the ENG button by using the copy and paste operations with the Ctrl+C and Ctrl+V keys. Move the new button by dragging it to new position within the screen so that it does not overlap the other one.
With the new button selected, open its properties window. Go to the Text property and change the string from ENG to ITA.
With the ITA button still selected, click on the Commands tab at the bottom of the editor.
Open the Commands panel, configure the command on the tab’s far right by selecting the it-IT option in the Language (Culture Name) property.

Save the project by clicking on the Save All icon on the Movicon.NExT editor’s Toolbar and start runtime to try out what we have created.

Test

While the application is running, change the Var1 tag value by using the spin button provided by the Display object. This should activate the animation of the Test Animation and Text Box objects.
When changing the language by using the two ENG and ITA buttons, the Text Animation and Text box object will be automatically translated.