IUP/Controls/IupMultiLine

From Vendetta Lua
Revision as of 10:13, 9 May 2023 by Draugath (Talk | contribs) (Created page with "__NOTOC__ __NOEDITSECTION__ Creates an editable field with one or more lines. ===Creation=== :iup.multiline{} -> (elem: ihandle) :This function returns the identifier of the...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


Creates an editable field with one or more lines.

Creation

iup.multiline{} -> (elem: ihandle)
This function returns the identifier of the created multiline, or nil if an error occurs.

Attributes

APPEND: Inserts a text at the end of the multiline.
INSERT: Inserts a text in the caret's position.
BORDER: Shows a frame around the multiline. Default: "YES".
CARET: Position of the insertion point in the multiline.
READONLY: Allows the user only to read the contents, without changing it. Possible values: "YES", "NO" (default).
NC: Maximum number of characters.
SIZE: Multiline size. Default: room for 5 characters in 1 line.
ALIGNMENT: Label's alignment. Possible values: "ALEFT", "ARIGHT", "ACENTER". Default: "ALEFT".
VALUE: Text typed by the user. The '\n' character indicates line change. Default: nil

Callbacks

ACTION: Action generated when a keyboard event occurs. The callback also receives the typed key.
elem:action(c: number, after: string) -> (ret: number) [in IupLua]
c: Identifier of the typed key. Please refer to the Keyboard Codes table for a list of possible values.
after: Represents the new text value if the key is validated (i.e. the callback returns IUP_DEFAULT).
If the function returns IUP_IGNORE, the system will ignore the typed character. If the function returns the code of any other key, IUP will treat this new key instead of the one typed by the user.
CARET_CB: Action generated when the caret/cursor position is changed.
elem:caret_cb(row, col: number) -> (ret: number)
row, col: Row and column number. VO: "1, 1" if the alignment is ALEFT or ARIGHT. "0, 0" if the alignment is ACENTER
Triggers on mouse-click or before ACTION

Notes

The multiline has a limitation of about 64,000 characters.
Since all the keys are processed to change focus to the next element press <Ctrl>+<Tab>. The "DEFAULTENTER" button will not be processed, but the "DEFAULTESC" will.