← All built-ins / ui_add()
ui_add()
ui_add(...$args): int
Parameters
| Name | Type | Description |
|---|---|---|
| $parent | int | window or container handle |
| $kind | int | 1 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 |
| $text | string | label / initial text |
| $x | int | left inside parent |
| $y | int | top inside parent |
| $w | int | width |
| $h | int | height |
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.