cancel
Showing results for 
Search instead for 
Did you mean: 

Display strings in TouchGFX

Iswarya
Associate II

Hi,

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

1 ACCEPTED SOLUTION

Accepted Solutions
Martin KJELDSEN
Chief III

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

View solution in original post

6 REPLIES 6
Martin KJELDSEN
Chief III

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
Associate II

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".

Martin KJELDSEN
Chief III

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
Chief III

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

HI,

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

Any help is appreciated.

Anju

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