Hi there :-), I have a scrollfield which has text input to it using some global procedures. When a button is clicked the procedure is run and the text in the scrollfield changes.
The text I want to input into the scrollfield is several paragraphs. Is it possible to format the text ? For example get it to drop down a line like the tag in HTML.
At the moment if I want to centre a word (for a title) I have to insert multiple spaces into the string. The same goes for dropping a line. Is there an better way to do this?
the escape character n (quite literally a slash and then the letter n) is the same as a carriage return (actually called the newline character, r is a carriage return, but they'll both do the same thing).
t is a tab
i'm not sure if you can do a centre tho... not in a textfield anyway. i'm not sure if there are any other useful escape characters... anyone?
Thats excellent, those characters are all I need. Thanks for that dude!
This might be a newbie question, but if I have a lot of text to enter in a string is there a way to put it on multiple lines rather than one long horizontal line? I've looked around and not found anything on this. It would just help make my code more readable..
Description This command creates a scrolling field that behaves similar to a unix shell for entering user input. You may specify the number of lines that will be remembered by the field with the -slc/saveLineCount flag. The default number of lines saved is 100. The shellField also maintains a command history buffer. You can specify the number of input lines that will be saved with the -hlc/historyLineCount flag. The default size of this buffer is 10.
Flags
-c/command string Command executed when the enter or return key is pressed. Note that this command is not executed when the enter or return key is preceeded by a '' character. This allows you to continue input on the next line.
<
if you refrain from attaching any command to the [Enter]-buttons or the control itself, it seems as if you could abuse this command to your purposes? (i'd have to guess, though... what do you need several liunes of input for?)
I want to enter several paragraphs of text into the scrollfield box from one string. I was just wondering if its possible to put the one string on more than one line in the source code. One long horizontal line of text is annoying to scroll through.
note: for shere reasons of vanity and looks, -and nothing else-, i write a new line everytime i break with "n", cause that way i get a preview-like impression of what it'll end up with.
Another idea that comes to mind is to do it like this...
string $thisIsAlotOfText = "This command creates a scrolling field that behaves "; $thisIsAlotOfText = $thisIsAlotOfText + "similar to a unix shell for entering user input."; $thisIsAlotOfText = $thisIsAlotOfText + "You may specify the number of lines that will be remembered "; $thisIsAlotOfText = $thisIsAlotOfText + "by the field with the -slc/saveLineCount flag."; . . . etc.
It gives you a little bit of formatting and readablity of the text in code.
and thats it. It makes formatting impossibly simple. plus it doesn't clutter up your code at all. to check out exactly how i do it, have a look at zooCST - its in the animation section.