TEXT_WIDGET
This element is created for displaying and editing multiline text. It supports various modes of operation, plain text, bbcode, lists, tables and more.
Attributes brief detailed show all inherited
| Name | Description | Default | |||
|---|---|---|---|---|---|
| id | Identifier of the element | ||||
| text | Static text to display (also can use 'value' for compatibilty with TEXT) | empty | |||
| string_id | String id to display/edit | empty | |||
| param_id | Parameter id to display/edit | empty | |||
| Size and position | |||||
| width | default width in pixels / relative in percentage / auto (or empty) | empty | |||
| min_width | minimum width in pixels (for resizing) | 200 | |||
| max_width | maximum width in pixels (for resizing) | 1000 | |||
| height | default width in pixels / relative in percentage / auto (or empty) | empty | |||
| min_height | minimum height (for resizing) | 30 | |||
| max_height | maximum height (for resizing) | 750 | |||
| h_align | Horizontal alignment of the widget in its parent cell | empty | |||
| v_align | Vertical alignment of the widget in its parent cell | empty | |||
| h_margin | horizontal margin of the widget | 2 | |||
| v_margin | vertical margin of the widget | 5 | |||
| v_offset | vertical offset of the widget | 0 | |||
| visible | show/hide the widget (does not impact the layout) | true | |||
| display | show/hide the widget | true | |||
| Content positioning | |||||
| h_pad | horizontal padding of the text content | 6 | |||
| v_pad | vertical padding of the text content | 6 | |||
| h_clip | additional h-clipping of the content area | 0 | |||
| v_clip | additional v-clipping of the content area | 0 | |||
| text_h_align | horizontal text alignment | left | |||
| text_v_align | vertical text alignment | top | |||
| Font-related | |||||
| font_face | Font name (face) with optional bold and italic | OS depe... | |||
| font_size | Font size (with optional min and max values) | 14;6;50 | |||
| font_size_persistent | Is font size remembered after font-resize | false | |||
| font_resize_follow_ratio | How much other elements are resized on font-resize | 0.4 | |||
| view_source_font | Font for the "view bbcode source" mode | OS depe... | |||
| text_color | Overrides text_color from the theme (added for simplicity) | empty | |||
| font_weight | "bold" or "normal" (added to mimic TEXT behaviour) | empty | |||
| font_style | "italic" or "normal" (added to mimic TEXT behaviour) | empty | |||
| Related to editing | |||||
| edit | Enable or disable editing | false | |||
| select | Enable or disable selection | false | |||
| string_update_mode | when to update original string (while editing) | lazy | |||
| max_length | Maximum length in characters for the text content (not counting bbcode tags) | -1 | |||
| allowed_chars | List of characters that can be used for text input | empty | |||
| max_undo_states | Supported depth of undo | 10 | |||
| word_separators | A built-in list of characters considered as word-separators (for editing/selection) | see des... | |||
| word_separators_exclude | Here you can add some characters you don't want to be word-separators | empty | |||
| cursor_pos_after_update | When string is updated externally, move cursor to start/end of the text. | empty | |||
| Decorations and controls | |||||
| theme | Name of the theme to use ("dark", "light" or user custom). See Themes. | empty | |||
| theme_restyle | Theme attributes to override (for use with DEFINE). See Themes. | empty | |||
| style | Theme attributes to override (for use with particular widget). See Themes. | empty | |||
| border_width | Size of the border in pixels. | 0 | |||
| scrollbars_mode | How to display vertical;horizontal scrollbars (never, always, auto, no_collapse) | auto | |||
| scrollbars_width | Size of scrollbars (in pixels) | 8 | |||
| vertical_resizer_width | Width of the vertical resizer handle (if visible) | 60 | |||
| vertical_resizer_height | Height of the vertical resizer handle (if visible) | 5 | |||
| corner_resizer_size | Sze of the bottom-right corner resizer (if visible) | 20 | |||
| line_numbers | Display line numbers (on the left side) | false | |||
| line_num_min_width | Minimal width of the line numbers column | 6 | |||
| line_num_start | From which number to start lines numeration | 1 | |||
| lines_as_split | DIsplay line numbers and stripe for each visible line | false | |||
| line_stripes | Display line stripes ("zebra"-background under lines) | false | |||
| Miscellaneous | |||||
| multiline | Enable or disable multiline mode | true | |||
| resize | Enable or disable resizing | vertical | |||
| dimensions_persistent | Are width and height remembered after resize | false | |||
| scrollpos | Vertical scroll position | 0 | |||
| scrollpos_x | Horizontal scroll position | 0 | |||
| scrollpos_fixed | Fix vertical scroll position (disable vertical scrolling) | false | |||
| scrollpos_x_fixed | Fix horizontal scroll position (disable horizontal scrolling) | false | |||
| buffered | Enable or disable buffering for CANVAS | true | |||
| right_click_script | Script executed on right-click. Overrides the default behavior. | empty | |||
| open_as_file_app | Which application to use for "Open as file" action | empty | |||
| unselect_on_blur | If text was selected, forget selection on losing focus | false | |||
| requires | Exposes required objects (for scripting). | empty | |||
| cursor | Which cursor to use (if not empty) | empty | |||
| options | Various options for tweaking TW behaviour | empty | |||
| options_def | The same as options, but with a lower priority (for DEFINES) | empty | |||
| base_dir | Base location for images | $_DIR_$ | |||
| Pre-parsing and BBCode | |||||
| trim_spaces | Trim leading/trailing spaces at start/end of line | leading... | |||
| replace_rn_to_n | Replace "\r\n" to simple "\n" | true | |||
| strip_comments | Strip /* comments like this */ in text | true | |||
| max_chars_in_line | Limit number of characters in line | auto | |||
| word_wrap_by_chars | Which characters to look for when splitting string | " \r" | |||
| bbcode | Enable or disable bbcode. See BBCode. | false | |||
| copy_with_bbcode | Enable or disable copying with bbcode | false | |||
| paste_with_bbcode | Enable or disable pasting with bbcode | false | |||
| bbcode_default_defs | Definitions of default bbcode complex tags (like h1, h2, list, hr...) | See bbc... | |||
| bbcode_defs | Here you can add your own complex tags and override defaults | ||||
| parse_tables | Enable or disable parsing tables | true | |||
| modify_tables | Enable or disable editing tables structure | false | |||
| Using with param_id | |||||
| content | String with param fields (to format output) | {as_str... | |||
| value_format | Format of the 'value' field | empty | |||
| value_suffix | Add a suffix for big and small values (10000 => 10k) | false | |||
| significant_digits | Number of significant digits to display, forcing the system to perform rounding | 0 | |||
| Events handling | |||||
| event | Name of the last fired event | empty | |||
| events_counter | Event tracker - increments every time event is fired | 0 | |||
Comments
Please, authorize to view and post comments.