Hello @Hafsa and welcome to the community!
I am not sure I understand what you want to achieve.
I have created a textArea, set its width manually to 300 and wrote a text longer than 300 pixels, I have also put the textArea behavior to "wrap between words".
I run this function when clicking the button :
virtual void function1()
{
touchgfx_printf("Size before WIDE_TEXT_WORDWRAP : %d\n", textArea1.getTextWidth());
textArea1.setWideTextAction(WIDE_TEXT_WORDWRAP);
touchgfx_printf("Size after WIDE_TEXT_WORDWRAP : %d\n", textArea1.getTextWidth());
}
And I get this result :

So with or without WIDE_TEXT_WORDMAP, the result is the length of the text, not the length of the textArea.
Perhaps you can share your project so I can see what you have done!
Regards,