IUP/Controls/IupMultiLine

From Vendetta Lua
Jump to navigationJump to search


Controls

Dialog
Fill
Hbox
Vbox
Zbox
Cbox
Radio
Button
Canvas
Frame
Label
List
Multiline
Text
Toggle
Progress Bar
Matrix
Tree
Navmap

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: Character 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
WANTSLONGPRESS: Possible values: "YES", "NO"
DONT_RECURSE: Possible values: "YES", "NO"
MARGINX: Possible values: number
MARGINY: Possible values: number
IMAGE
BOXCOLOR: The color of the IupMultiLine when it is not selected.
MOUSEOVERBOXCOLOR: The color of the control when it is selected or the mouse hovers over it.
SCROLL: Possible values: "PAGEUP", "PAGEDOWN", "TOP", "BOTTOM"

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 on mouse click or before ACTION.
   elem:caret_cb(row, col: number) -> (ret: number)
row, col: Row and column number. Possible values: "1, 1" if the alignment is ALEFT or ARIGHT. "0, 0" if the alignment is ACENTER
GETFOCUS_CB
KILLFOCUS_CB
ENTERWINDOW_CB
LEAVEWINDOW_CB
DRAGENTER_CB
DRAGLEAVE_CB
DRAGOVER_CB
DROP_CB
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.
Clicking on the control will only set the caret to the first row (VERIFY)