CreateTextArea ( x,y,width,height,group[,style] )
Parameters
|
x,y - position of the text area's top-left corner within the group's client area width,height - size of the text area group - window or gadget group that owns the text area style (optional) - line handling 0: long lines scroll horizontally (default) bit 1: word wrap |
Description
|
Creates a multi-line text area gadget and returns its handle. Requires Extended language mode. A full multi-line editor backed by Microsoft Rich Edit - the control for notes fields, script editors, logs and readouts, holding up to 16MB of text. Text crosses the runtime as UTF-8, and every position or length the text area commands take is a Unicode scalar position, so a range can never split an emoji or other surrogate pair. Line breaks come back to you as carriage returns, Chr(13). The family around it: SetGadgetText and AddTextAreaText put text in, SetTextAreaText splices a range, TextAreaText reads one back; FormatTextAreaText, SetTextAreaColor, SetTextAreaFont and SetTextAreaTabs handle styling; TextAreaLen, TextAreaCursor and friends measure; and LockTextArea makes it read-only for display panes. User edits post a critical gadget-action event ($401) with EventData 1, while cursor and selection movement posts one with EventData 0 - handy for a live line/column readout. See it working in the tree and text area sample and the world editor shell sample. See also: AddTextAreaText, SetTextAreaText, TextAreaText, FormatTextAreaText, LockTextArea, TextAreaCursor. |
Index