Game Development Community

Help with GuiMLTextCtrl and word wrap

by William Urban · in Torque Game Builder · 05/23/2007 (8:42 am) · 1 replies

Hello all,

I'm stumped using this GuiMLTextCtrl. So I have a GuiScrollCtrl box and inside that right now I have a GuiTextListCtrl. When I post lines of text to this it works and I can scroll up and down. But the problem is it doesn't word wrap so if my box is say 100 characters wide, when I get to 101 characters it goes out of the box and you can't see it. I was reading in the Game Programmers guide to Torque in the GUI chapter that I can use GuiMLTextCtrl to do multiline text and colors and all sorts of stuff. The problem is that when I replace my textList with a GuiMLTextCtrl everything stops working. I try the %control.addText and that doesn't seem to work.

Can anyone help me in the proper syntax to get it so that if I have a string of say 200 characters it will put it there and word wrap it properly?

Thanks,

-Will

#1
06/06/2007 (1:32 pm)
Are you setting the second parameter of addText (reformat) to true? If not, it won't update the control to show the new text.