in Embedded Wizard Studio by
I need to to animate multiple strings with some icons.

For example :

"Icon1  text  icon2  text  icon3  text"

I need to animate the above thing how can we able to achieve this

1 Answer

0 votes

Hello mvg,

since you want to combine text and images, the Attributed Text view could be used for this purpose. To perform the animation, you would additionally need to update the string content repeatedly. For example, to display "Icon1 text Icon2 text Icon3 text", you would assign to the Attributed Text view a string like this:

"{img1.0} text {img2.0} text {img3.0} text"

The number 1.0, 2.0, 3.0 refer the desired bitmap to display (1, 2 or 3) and its frame 0. The bitmaps are provided to the Attributed Text view within the so-called Attributed Set object. See also Specify bitmaps in the Attributed SetDisplay a bitmap within the text and Select a frame of a multi-frame bitmap.

Now, when you want the images to be animated, use a Timer object to trigger a slot method. In the slot method modify the string assigned to the Attributed text view. For example, to display the second frame of the images, update the string to:

"{img1.1} text {img2.1} text {img3.1} text"

The example expects that the images are multi-frame images. See the section Configure a multi-frame bitmap resource.

If you don't want to modify the string assigned to the Attributed Text view, then you can perform the animation also by changing the bitmaps stored in the Attributed Set object. When you modify the Attributed Set object, the Attributed Text view connected with it is updated automatically. Thereupon new bitmap appears. This approach, however, expects the image animations to be stored as a sequence of separate bitmap resources. The first approach above, in turn, uses multi-frame bitmaps.

I hope it helps you further.

Best regards

Paul Banach



Can you please explain what do you mean with 'was not working'. Do you get an error message?

From technical point of view there is no difference between the initialization in Inspector and in Code Editor.

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint