← All built-ins / ui_add()

ui_add()

ui_add(...$args): int

Parameters

NameTypeDescription
$parentintwindow or container handle
$kindint1 window 2 button 3 label 4 input 5 checkbox 6 list 7 combo 8 progress 9 slider 10 group 11 tab 12 panel 13 menu 14 menuitem 15 picture
$textstringlabel / initial text
$xintleft inside parent
$yinttop inside parent
$wintwidth
$hintheight

Return value

Control handle for ui_set/ui_get/ui_on, …

Example

echo "$btn = ui_add($win, 2, "Click me", 20, 20, 120, 30); // 2 = button";
$btn = ui_add($win, 2, "Click me", 20, 20, 120, 30); // 2 = button

This call needs a real environment (window, server, database or stdin) — the snippet above shows the typical usage shape.

See also

ui_on()ui_set()ui_get()