Archive 17/01/2023.

How do I use SetTextAlignment?

behindcurtain3

Hello, I’m trying to align a Text to the right. Whenever I set:

text->SetTextAlignment(HA_RIGHT);

or

text->SetTextAlignment(HA_CENTER);

It makes the text disappear completely. Is there something simple I’m missing to align the text to the right or center?

1vanK

try use text->SetSize() first

behindcurtain3

Thanks 1vanK, it turns out I needed text->SetFixedSize() to get it working properly.