Skip to main content
Marco.R
Senior
November 10, 2020
Solved

Box / Border for Textarea

  • November 10, 2020
  • 1 reply
  • 1056 views

Hi

Our marketing needs to know how much space they have for translation etc. and requested if we can show this visually on the screens. The easiest would be if each textarea had a box or border, which indicates the size.

Is there an easy way to add a box/border to the textarea that I can see visually how big the textarea is? It should be applicable to the whole application and every textarea with or without wildcard.

Thanks a lot.

Best regards

Marco

This topic has been closed for replies.
Best answer by Marco.R

I found a solution which works for me.

For everyone, who has the same "problem":

Add the following code at the beginning of the draw methods of the textarea.cpp and textareawithwildcards.cpp files:

 Rect dirty = area;
 translateRectToAbsolute(dirty);
 HAL::lcd().fillRect(dirty, colortype(0x0000FE00U), 127U);

This draws yellow semi transparent boxes behind the texts.

/Marco

1 reply

Marco.R
Marco.RAuthorBest answer
Senior
November 10, 2020

I found a solution which works for me.

For everyone, who has the same "problem":

Add the following code at the beginning of the draw methods of the textarea.cpp and textareawithwildcards.cpp files:

 Rect dirty = area;
 translateRectToAbsolute(dirty);
 HAL::lcd().fillRect(dirty, colortype(0x0000FE00U), 127U);

This draws yellow semi transparent boxes behind the texts.

/Marco