Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Joseph on Sun 20/02/2011 21:55:52

Title: i want a textbox to show a paragrpah of text, how???
Post by: Joseph on Sun 20/02/2011 21:55:52
Howdee dudes!

How do I write so that I can put paragraph of text into a textbox in AGS right now I really dont know how, i looked in manual and coultn find how?

somthing like txtTurtleMenu.Text = "insert text here-insert text here-insert text here-insert text here-insert text here";

just imagine its a huge paragraph of text. how do i break that line up there so i can make it a paragraph with breaks where i want? if i do that code, the text goes in 1 line all the way and goes outside my textbox border like its crazy.

please help!???  :) :)
Title: Re: i want a textbox to show a paragrpah of text, how???
Post by: barefoot on Sun 20/02/2011 23:16:56
Hi

I use this: [ to make a new line.  And this: [[ to make a paragraph.

Example:


cEgo.Say("Hello, I am wizard Manga.[ How do you do. [[ I am well thank you");


Produces this:
Hello, I am wizard Manga.
How do you do.

I am well thank you.


I use it  for Say and Display options. Not sure about inside a text box, depends what you are doing.

barefoot



Title: Re: i want a textbox to show a paragrpah of text, how???
Post by: Khris on Sun 20/02/2011 23:30:33
If you need the text to be editable then you're out of luck.*
If you just need to display text, use a label. They wrap text automatically.

*You'd have to code your own editor.