2024-07-08 12:04 AM
How to change the alignment of textarea from the default style set in touchgfx designer?
In touchgfx designer(Version:4.21.3) I have set to Left alignment. I use this textarea for multiple purposes, for few I need to set to Left alignment and for few I need to set to Right alignment. I tried using ' textArea.setTextAlignment(TEXT_ALIGNMENT_RIGHT);' but it says set alignment is not a member.
Solved! Go to Solution.
2024-07-08 08:43 AM - edited 2024-07-08 08:44 AM
2024-07-08 09:06 AM - edited 2024-07-08 09:07 AM
Thanks for the solution @ferro and Thanks for the suggestions @GaetanGodart . I have found the solution for left, right alignments(I need only left, right alignment).
Solution:
1. I have declared in Texts section as 'T_ALIGN_LEFT',' T_ALIGN_RIGHT' Ids text is "<>" with different alignment in designer.
2. Where ever, I wanted to set to Right Alignment, I'm writing code as
3. And using this code to set it back to Left alignment whereever required: