Shows a modal dialog to edit a multiline text.

Creation and Show

int IupGetText(const char* title, char *text, int maxsize); [in C]
iup.GetText(title, text: string[, maxsize: number]) -> (text: string) [in Lua]

text: the initial value of the text and the returned text.
maxsize: maximum size for the edited string. In Lua the default maxsize is 10240. If set to 0 will be the current length of text, if set to -1 the dialog will be read-only and only the OK button is displayed (since 3.29). (since 3.17)

Returns: a non zero value if successful. In Lua returns the text or nil if an error occurred.


The function does not allocate memory space to store the text entered by the user. Therefore, the text parameter must be large enough to contain the user input. The returned string is limited to maxsize characters. In Lua the

The dialog uses a global attribute called "PARENTDIALOG" as the parent dialog if it is defined. It also uses a global attribute called "ICON" as the dialog icon if it is defined.


See Also

IupMessage, IupScanf, IupListDialog, IupAlarm, IupSetLanguage.