IupMultiLine

IUP - Portable User Interface

IupMultiLine

Creates an editable field with one or more lines.

Creation

Ihandle* IupMultiLine(char *action); [in C]
iupmultiline{} -> (elem: iuplua_tag) [in IupLua3]
iup.multiline{} -> (elem: iuplua_tag) [in IupLua5]
multiline(action) [in LED]

action: name of the action generated when the user types something.

This function returns the identifier of the created multiline, or NULL 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).

SELECTION: Selection interval.

SELECTEDTEXT: Selection's text.

NC: Maximum number of characters.

SIZE: Multiline size. Default: 5 characters width and 1 character height.

ALIGNMENT:  (Windows Only) Label's alignment. Possible values: "ALEFT", "ARIGHT", "ACENTER". Default: "ALEFT".

VALUE: Text typed by the user. The '\n' character indicates line change.

Default: NULL.

TABSIZE (Windows Only)

Controls the number of characters for a tab stop.

Callbacks

ACTION: Action generated when a keyboard event occurs. The callback also receives the typed key.

int function(Ihandle *self, int c, char* after); [in C]
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.

int function(Ihandle *self, int row, int col); [in C]
elem:caretcb(row, col: number) -> (ret: number) [in IupLua3]
elem:caret_cb(row, col: number) -> (ret: number) [in IupLua5]

row, col: Row and collumn number.

Notes

Text is always left aligned.

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.

Examples

iupmultiline.gif (9938 bytes)