Lua:Neutrino-API:messagebox:en

Aus TuxBoxWIKI
Wechseln zu: Navigation, Suche

messagebox

Creates a message box object, required to show a message box on screen with text and button(s).
Return value defines pressed button.

messagebox.exec{Parameter}


Parameter:

Parameter Typ Description/Beschreibung
name | title | caption string caption text
text string message text
default string default return value "yes" | "no" | "ok" | "cancel" | "back"
buttons string shown buttons
can be combined from "all"
"yes", "no", "ok", "cancel", "back", "all"
align string alignment of buttons "center1" | "center2" | "left" | "right"
Default: "center1"
icon string icon in titlebar Default: "info"
width number width of messagebox Default: 450
timeout number timeout till hide Default: EPG Timeout
return_default_on_timeout boolean Return of default-value, when box will be closed Default: false
en: Parameters with default-values are optional. If not needed, no definition is required. In case of missing parameter, default value is used.

de: Parameter mit Default-Wert sind optional. dh. sie müssen nicht angegeben werden. Falls der Parameter fehlt, wird automatisch dieser Wert angenommen.


Example:

local ret = messagebox.exec{ title="Morgen ist Freitag", text="Findest du das gut?", buttons={"yes", "no", "cancel"} };