cancel
Showing results for 
Search instead for 
Did you mean: 

Box / Border for Textarea

Marco.R
Senior

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

1 ACCEPTED SOLUTION

Accepted Solutions
Marco.R
Senior

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

View solution in original post

1 REPLY 1
Marco.R
Senior

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