Skip to main content
Iswarya
Associate III
May 6, 2019
Solved

Display strings in TouchGFX

  • May 6, 2019
  • 6 replies
  • 2420 views

Hi,

How to display strings in TouchGFX which is not defined previously in GUI

This topic has been closed for replies.
Best answer by Martin KJELDSEN

Oh, so you're already using wildcards? Then i think it's just an issue with your text area not adjusting its width to the new text =) call textArea.resizeToCurrentText() - Or disable auto resize in the designer for that text area and just make the textarea wide enough to hold whatever text you want to display.

/Martin

6 replies

Martin KJELDSEN
Principal III
May 7, 2019

Hi @Iswarya​,

When you say GUI, do you mean "not defined previously in Designer" ? The designer manages an excel sheet of all the texts that you input through the designer interface. Are you talking about a text that changes dynamically?

/Martin

Iswarya
IswaryaAuthor
Associate III
May 7, 2019

Hi Martin,

Yes, you are right. I'm asking about to change text dynamically. I could display a character on the fly but not string. Say, I could display a character "S" but not string "SUCCESS".

ABeck.1
Associate III
April 7, 2020

HI,

I want to display "ABC" but it is displaying only C, not ABC, What could be the reason?

Any help is appreciated.

Anju

Martin KJELDSEN
Principal III
April 8, 2020

I need way more info to help :) My guess is that this is a textarea with a wild-card? And you haven't specified wild-card characters for A and B (you should be seeing "??C" in this case OR you have a right aligned text-area that is too short, so the A and B are there, but cut off.

Which one

/Martin

Martin KJELDSEN
Martin KJELDSENBest answer
Principal III
May 8, 2019

Oh, so you're already using wildcards? Then i think it's just an issue with your text area not adjusting its width to the new text =) call textArea.resizeToCurrentText() - Or disable auto resize in the designer for that text area and just make the textarea wide enough to hold whatever text you want to display.

/Martin

Martin KJELDSEN
Principal III
May 8, 2019

E.g. The designer generates a textarea for you that is the size of 1 char because you haven't populated it with anything yet. So when you update the textarea wildcard buffer, the size of the textarea remains the same because the textarea does not "listen" for any updates to its buffer.

/Martin