cancel
Showing results for 
Search instead for 
Did you mean: 

TextArea "center" alignment

farble1670
Associate III

I have a TextArea that spans the full width of my screen:

farble1670_0-1722891459578.png

I've selected "center" alignment:

farble1670_1-1722891484815.png

However, when I dynamically set the text at runtime, 

    Unicode::fromUTF8(merchant_name_data, merchant_nameBuffer, MERCHANT_NAME_SIZE);
    merchant_name.resizeToCurrentText();
    merchant_name.invalidate();

It ends up left-justified:

farble1670_2-1722891671953.png

? Thanks.

 

1 ACCEPTED SOLUTION

Accepted Solutions
farble1670
Associate III

My mistake, obviously I'm resizing the text area.

    merchant_name.resizeToCurrentText(); // Don't do that

View solution in original post

1 REPLY 1
farble1670
Associate III

My mistake, obviously I'm resizing the text area.

    merchant_name.resizeToCurrentText(); // Don't do that