Getting exact width of text

AshMcConnell

30-06-2010 14:56:23

Hi Folks,

Is there a way to get the width of text in a caption. I would like to flash up a piece of Text with a dark (transparent) background behind it. Is there a way to calculate the width of the text each time it changes in order to correctly size the parent widget (with the background)?

Thanks for your help
All the best,
Ash

Altren

30-06-2010 19:30:02

MyGUI::IntSize size = edit->getTextSize();

AshMcConnell

30-06-2010 19:37:08

Arg sorry, how did I miss that! :)

Thanks!
Ash