2.00 TextEditor
Lokasenna edited this page Jun 24, 2018
·
1 revision
Provides a multiline text editor.
- Forces a monospace font, because it makes things way easier.
- Supports most common commands - copy, paste, selections, navigation, tab, backtab, etc.
- Due to Reaper limitations, tab characters are automatically replaced with four spaces.
- Does not support word wrapping yet, unfortunately.
z Element depth, used for hiding and disabling layers. 1 is the highest.
x, y Coordinates of top-left corner
w, h Width and height of the text editor
text Multiline string of text
caption Label shown to the left of the text editor
pad Padding between the label and the text editor
cap_bg Color to be drawn underneath the label. Defaults to "wnd_bg"
bg Editor background. Defaults to "elm_bg"
shadow Boolean. Draw a shadow beneath the label?
color Text color
font_a Label font
font_b Text font.
*** Only monospaced fonts will work properly ***
focus Whether the text editor is "in focus" or not, allowing users to type.
This setting is automatically updated, so you shouldn't need to
change it yourself in most cases.
undo_limit How many undo states can be stored before the first is erased.
Defaults to 20.
Returns self.retval as a string.
Accepts a either a table or a multiline string.
If your script needs to resize the text editor, move it around, etc, run this afterward so it can update a few internal values.
Introduction
- 1. Getting started
- 2. Parts of a basic script
- 3. How it works
- 4. Fonts and colors
- 5. Element methods
Elements
- 1. Button
- 2. Frame
- 3. Knob
- 4. Label
- 5. Listbox
- 6. Menubar
- 7. Menubox
- 8. Options
- 9. Slider
- 10. Tabs
- 11. Textbox
- 12. TextEditor
- 13. Window
Core functions
- 1. Element creation
- 2. GUI variables
- 3. Script hooks
- 4. Table functions
- 5. Text functions
- 6. Color functions
- 7. Math and Logic functions
- 8. Graphics functions
- 9. Element functions
Additional documentation