Lua:Neutrino-API:messagebox:en

Aus TuxBoxWIKI
Version vom 16. September 2019, 11:44 Uhr von Dbt (Diskussion | Beiträge) (Kommentar eingefügt)
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
text_mode string flags for text modes API >= v1.82 Note: 'mode' is obsolete but still usable, 'text_mode' should be preferred ALIGN_AUTO_WIDTH
ALIGN_AUTO_HIGH
ALIGN_SCROLL Default
ALIGN_CENTER Default
ALIGN_RIGHT
ALIGN_TOP
ALIGN_BOTTOM
ALIGN_NO_AUTO_LINEBREAK
DECODE_HTML
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"} };