Skip to main content
ALuiz.1
Associate II
May 19, 2022
Question

How to print no string?

  • May 19, 2022
  • 2 replies
  • 780 views

Hi,

I'm using a container with a text area with no wildcard for printing different strings, it works fine with text.setTypedText(TypedText(T_XX)); according to the if value. But sometimes it needs to print no string, something like text.setTypedText(NULL); but I can't do this, it doesn't accept NULL parameter and using wildcard, it prints the previous value of text area. How to clean the text area?

This topic has been closed for replies.

2 replies

Andrew Neil
Super User
May 20, 2022

What if you just use an empty string - ie, "" ?

Or maybe a string that contains only whitespace?

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Osman SOYKURT
ST Technical Moderator
May 20, 2022

Hello ALuiz.1,

I'd go for a solution like Andrew Neil said. Just create a new text empty, and use it in your code.

Don't forget to call the invalidate() function with your textArea widget so that the previous value will be removed and the new one (empty string) will be applied.

/Osman

ST Software Developer | TouchGFX