Gui Library Reference
The EasyBite GUI library empowers users to build interactive applications by providing functions to create and manage forms (windows) and various controls such as buttons, labels, textboxes, and more advanced elements like treeviews and sliders. Key benefits include:
- Simplicity: Intuitive functions make GUI development accessible without deep technical knowledge.
- Integration: Seamlessly works within EasyBite’s runtime, ensuring safety and ease of use.
- Versatility: Supports a wide range of controls and layouts for diverse application needs.
This reference mirrors the structure of the EasyBite system and socket library documentation, using tables to list functions with their parameters and descriptions, followed by examples demonstrating their usage.
Form Creation and Management
| Function | Parameters | Description |
|---|---|---|
createform | title (String), width (Number), height (Number) | Creates a new form with the specified title and dimensions. Returns a FormObject. |
runapp | form_id (FormObject) | Runs the application with the specified form as the main window. |
setresizable | form_id (FormObject), resizable (Bool) | Sets whether the form can be resized by the user. |
getresizable | form_id (FormObject) | Returns whether the form is resizable (true or false). |
setstartposition | form_id (FormObject), position (String: "centerscreen"/"manual") | Sets the form’s starting position. |
getstartposition | form_id (FormObject) | Returns the form’s starting position as a string. |
setfullscreen | form_id (FormObject), fullscreen (Bool) | Toggles fullscreen mode. |
getfullscreen | form_id (FormObject) | Returns whether the form is in fullscreen mode. |
setposition | form_id (FormObject), x (Number), y (Number) | Sets the form’s position (when start position is "manual"). |
setmaximized | form_id (FormObject), maximized (Bool) | Toggles maximized state. |
getmaximized | form_id (FormObject) | Returns whether the form is maximized. |
setborder | form_id (FormObject), border (Bool) | Toggles the form’s border. |
getborder | form_id (FormObject) | Returns whether the form has a border. |
showform | form_id (FormObject) | Makes the form visible. |
hideform | form_id (FormObject) | Hides the form. |
exit | — | Exits the running application. |
restore | form_id (FormObject) | Restores from maximized/fullscreen to normal. |
closeform | form_id (FormObject) | Closes and removes the form. |
Control Creation
Label
| Parameter | Type | Description |
|---|---|---|
form_id | FormObject | Parent form object. |
text | String | Display text. |
| Optional: | Various | x, y, width, height (Number)autosize (Bool)fontname (String)fontsize (Number)fontweight (String)forecolor, backcolor (String) |
Example
import gui
set form to gui.createform("Label Demo", 300, 150)
set lbl to gui.label(form, "Username:", 10, 10, 80, 20, true, "SegoeUI", 12, "regular", "#000000", "#FFFFFF")
gui.runapp(form)
Button
| Parameter | Type | Description |
|---|---|---|
form_id | FormObject | Parent form object. |
text | String | Button text. |
| Optional: | Various | callback (Function)x, y, width, height (Number)autosize (Bool)fontname (String)fontsize (Number)fontweight (String)forecolor, backcolor (String) |
Example
import gui
function onClick()
show("Button clicked!")
end function
set form to gui.createform("Button Demo", 300, 150)
set btn to gui.button(form, "Click Me", onClick, 50, 50, 100, 30)
gui.runapp(form)
TextBox
| Parameter | Type | Description |
|---|---|---|
form_id | FormObject | Parent form object. |
text | String | Initial text. |
| Optional: | Various | Same optional parameters as Button. |
Example
import gui
set form to gui.createform("TextBox Demo", 300, 150)
set txt to gui.textbox(form, "", 10, 10, 200, 25)
gui.runapp(form)
CheckBox
| Parameter | Type | Description |
|---|---|---|
form_id | FormObject | Parent form object. |
text | String | Label text. |
| Optional: | Various | Same optional parameters as Button, plus checked (Bool). |
Example
import gui
set form to gui.createform("CheckBox Demo", 300, 150)
set chk to gui.checkbox(form, "Accept Terms", 10, 10, 120, 20, false)
gui.runapp(form)
RadioBox
| Parameter | Type | Description |
|---|---|---|
form_id | FormObject | Parent form object. |
text | String | Label text. |
group | String | Group name (for grouping radio buttons). |
| Optional: | Various | Same as CheckBox, plus checked (Bool). |
Example
import gui
set form to gui.createform("RadioBox Demo", 300, 150)
set rb1 to gui.radiobox(form, "Option A", "grp1", 10, 10, 100, 20, true)
set rb2 to gui.radiobox(form, "Option B", "grp1", 10, 40, 100, 20, false)
gui.runapp(form)
GroupBox
| Parameter | Type | Description |
|---|---|---|
form_id | FormObject | Parent form object. |
title | String | Group box title. |
| Optional: | Various | x, y, width, height (Number), border (Bool). |
Example
import gui
set form to gui.createform("GroupBox Demo", 300, 200)
set grp to gui.groupbox(form, "User Info", 10, 10, 280, 100, true)
gui.runapp(form)
Panel
| Parameter | Type | Description |
|---|---|---|
form_id | FormObject | Parent form object. |
| Optional: | Various | x, y, width, height (Number), border (Bool). |
Example
import gui
set form to gui.createform("Panel Demo", 300, 200)
set pnl to gui.panel(form, 10, 10, 280, 100, true)
gui.runapp(form)
Card
| Parameter | Type | Description |
|---|---|---|
form_id | FormObject | Parent form object. |
| Optional: | Various | x, y, width, height (Number). |
Example
import gui
set form to gui.createform("Card Demo", 300, 200)
set card to gui.card(form, 10, 10, 280, 100)
gui.runapp(form)
Sidebar
| Parameter | Type | Description |
|---|---|---|
form_id | FormObject | Parent form object. |
| Optional: | Various | x (Number), width (Number), dock (String: "left"/"right"). |
Example
import gui
set form to gui.createform("Sidebar Demo", 400, 300)
set sb to gui.sidebar(form, 0, 100, "left")
gui.runapp(form)
Pages (Tabbed)
| Parameter | Type | Description |
|---|---|---|
form_id | FormObject | Parent form object. |
| Optional: | Various | page_titles (Array), default_panel (Bool), x, y, width, height (Number). |
Example
import gui
set form to gui.createform("Pages Demo", 400, 300)
set tabs to gui.pages(form, ["Home","Settings"], true, 10, 10, 380, 280)
gui.runapp(form)
PictureBox
| Parameter | Type | Description |
|---|---|---|
form_id | FormObject | Parent form object. |
| Optional: | Various | x, y, width, height (Number). |
Example
import gui
set form to gui.createform("PictureBox Demo", 300, 250)
set pb to gui.picturebox(form, 10, 10, 280, 200)
gui.setimage(pb, "path/to/image.png")
gui.runapp(form)
ProgressBar
| Parameter | Type | Description |
|---|---|---|
form_id | FormObject | Parent form object. |
| Optional: | Various | x, y, width, height (Number). |
Example
import gui
set form to gui.createform("ProgressBar Demo", 300, 150)
set pb to gui.progressbar(form, 10, 10, 280, 20)
gui.setvalue(pb, 50)
gui.runapp(form)
ScrollBar
| Parameter | Type | Description |
|---|---|---|
form_id | FormObject | Parent form object. |
orientation | String | "horizontal" or "vertical". |
| Optional: | Various | x, y, width, height (Number). |
Example
import gui
set form to gui.createform("ScrollBar Demo", 200, 150)
set sb to gui.scrollbar(form, "vertical", 180, 10, 10, 130)
gui.runapp(form)
Timer
| Parameter | Type | Description |
|---|---|---|
| Optional: | Various | interval (Number, ms), callback (Function). |
Example
import gui
function onTick()
show("Tick")
end function
set t to gui.timer(1000, onTick)
gui.starttimer(t)
DateTimePicker
| Parameter | Type | Description |
|---|---|---|
form_id | FormObject | Parent form object. |
| Optional: | Various | x, y, width, height (Number), format (String). |
Example
import gui
set form to gui.createform("DateTimePicker Demo", 300, 200)
set dt to gui.datetimepicker(form, 10, 10, 200, 25, "yyyy-MM-dd HH:mm")
gui.runapp(form)
TimePicker
| Parameter | Type | Description |
|---|---|---|
form_id | FormObject | Parent form object. |
| Optional: | Various | Same as DateTimePicker. |
Example
import gui
set form to gui.createform("TimePicker Demo", 300, 200)
set tp to gui.timepicker(form, 10, 10, 200, 25, "HH:mm")
gui.runapp(form)
Table
| Parameter | Type | Description |
|---|---|---|
form_id | FormObject | Parent form object. |
| Optional: | Various | x, y, width, height (Number)fontname (String)fontsize (Number)forecolor, backcolor (String)text_alignment (String) |
Example
import gui
set form to gui.createform("Table Demo", 400, 250)
set tbl to gui.table(form, 10, 10, 380, 200)
gui.settabledata(tbl, ["Name","Age"], [["Alice",30],["Bob",25]])
gui.runapp(form)
Menu
| Parameter | Type | Description |
|---|---|---|
form_id | FormObject | Parent form object. |
| Optional: | Various | x, y, width (Number). |
Example
import gui
set form to gui.createform("Menu Demo", 400, 300)
set mnu to gui.menu(form, 0, 0, 400)
gui.menuitem(mnu, "File", null, [
{ label: "Open", callback: onOpen },
{ label: "Exit", callback: onExit }
])
gui.runapp(form)
function onOpen()
show("Open selected")
end function
function onExit()
gui.exit()
end function
Separator
| Parameter | Type | Description |
|---|---|---|
form_id | FormObject | Parent form object. |
| Optional: | Various | orientation (String: "horizontal"/"vertical"), x, y, width, height (Number). |
Example
import gui
set form to gui.createform("Separator Demo", 300, 150)
gui.separator(form, "horizontal", 10, 70, 280, 2)
gui.runapp(form)
GridLayout
| Parameter | Type | Description |
|---|---|---|
form_id | FormObject | Parent form object. |
| Optional: | Various | rows, cols (Number), x, y, width, height (Number), show_grid_lines (Bool). |
Example
import gui
set form to gui.createform("GridLayout Demo", 300, 200)
set grid to gui.gridlayout(form, 2, 2, 10, 10, 280, 180, true)
set btn1 to gui.button(form, "A")
set btn2 to gui.button(form, "B")
set btn3 to gui.button(form, "C")
set btn4 to gui.button(form, "D")
gui.setlayoutcells(grid, 0, 0, btn1)
gui.setlayoutcells(grid, 0, 1, btn2)
gui.setlayoutcells(grid, 1, 0, btn3)
gui.setlayoutcells(grid, 1, 1, btn4)
gui.runapp(form)
FlowLayout
| Parameter | Type | Description |
|---|---|---|
form_id | FormObject | Parent form object. |
| Optional: | Various | x, y, width, height (Number). |
Example
import gui
set form to gui.createform("FlowLayout Demo", 300, 150)
set flow to gui.flowlayout(form, 10, 10, 280, 130)
set gui.setspacing(flow, 5)
foreach i in ["One","Two","Three","Four"]
set btn to gui.button(form, i)
gui.addto(flow, btn)
end foreach
gui.runapp(form)
VerticalLayout
| Parameter | Type | Description |
|---|---|---|
form_id | FormObject | Parent form object. |
| Optional: | Various | x, y, width, height (Number). |
Example
import gui
set form to gui.createform("VerticalLayout Demo", 200, 200)
set vbox to gui.verticallayout(form, 10, 10, 180, 180)
foreach lbl in ["Top","Middle","Bottom"]
set lblc to gui.label(form, lbl)
gui.addto(vbox, lblc)
end foreach
gui.runapp(form)
HorizontalLayout
| Parameter | Type | Description |
|---|---|---|
form_id | FormObject | Parent form object. |
| Optional: | Various | x, y, width, height (Number). |
Example
import gui
set form to gui.createform("HorizontalLayout Demo", 300, 100)
set hbox to gui.horizontallayout(form, 10, 10, 280, 80)
foreach txt in ["Left","Center","Right"]
set lblc to gui.label(form, txt)
gui.addto(hbox, lblc)
end foreach
gui.runapp(form)
Shape
| Parameter | Type | Description |
|---|---|---|
form_id | FormObject | Parent form object. |
| Optional: | Various | x, y, width, height (Number), border_style (String). |
Example
import gui
set form to gui.createform("Shape Demo", 300, 300)
set shp to gui.shape(form, 50, 50, 200, 200, "solid")
gui.forward(shp, 100)
gui.towardright(shp, 90)
gui.forward(shp, 100)
gui.runapp(form)
TreeView
| Parameter | Type | Description |
|---|---|---|
form_id | FormObject | Parent form object. |
| Optional: | Various | x, y, width, height (Number). |
Example
import gui
set form to gui.createform("TreeView Demo", 300, 250)
set tree to gui.treeview(form, 10, 10, 280, 200)
set root to gui.nodeitem(tree, "Root")
set child to gui.nodeitem(tree, "Child", root)
gui.runapp(form)
Slider
| Parameter | Type | Description |
|---|---|---|
form_id | FormObject | Parent form object. |
orientation | String | "horizontal" or "vertical". |
| Optional: | Various | x, y, width, height (Number). |
Example
import gui
set form to gui.createform("Slider Demo", 300, 150)
set sld to gui.slider(form, "horizontal", 10, 10, 280, 30)
gui.setmin(sld, 0)
gui.setmax(sld, 100)
gui.setvalue(sld, 25)
gui.runapp(form)
RichText
| Parameter | Type | Description |
|---|---|---|
form_id | FormObject | Parent form object. |
| Optional: | Various | x, y, width, height (Number). |
Example
import gui
set form to gui.createform("RichText Demo", 400, 300)
set rt to gui.richtext(form, 10, 10, 380, 280)
gui.settext(rt, "This is **rich** text.")
gui.runapp(form)
Toolbar
| Parameter | Type | Description |
|---|---|---|
form_id | FormObject | Parent form object. |
| Optional: | Various | x, y, width (Number). |
Example
import gui
set form to gui.createform("Toolbar Demo", 400, 250)
set tb to gui.toolbar(form, 0, 0, 400)
gui.addto(tb, gui.button(form, "New", onNew))
gui.addto(tb, gui.button(form, "Save", onSave))
gui.runapp(form)
function onNew() show("New clicked") end function
function onSave() show("Save clicked") end function
StatusBar
| Parameter | Type | Description |
|---|---|---|
form_id | FormObject | Parent form object. |
| Optional: | Various | text (String), x, y, width (Number). |
Example
import gui
set form to gui.createform("StatusBar Demo", 400, 200)
set sb to gui.statusbar(form, "Ready", 0, 180, 400)
gui.runapp(form)
ImageButton
| Parameter | Type | Description |
|---|---|---|
form_id | FormObject | Parent form object. |
| Optional: | Various | x, y, width, height (Number). |
Example
import gui
set form to gui.createform("ImageButton Demo", 200, 200)
set ib to gui.imagebutton(form, 50, 50, 100, 100)
gui.setimage(ib, "icon.png")
gui.setclickhandler(ib, onImgClick)
gui.runapp(form)
function onImgClick() show("Image clicked") end function
ColorDialog
| Parameter | Type | Description |
|---|---|---|
form_id | FormObject | Parent form object. |
Example
import gui
set form to gui.createform("ColorDialog Demo", 300, 150)
set cd to gui.colordialog(form)
gui.showcolordialog(cd)
set clr to gui.getcolor(cd, "hex")
show("Selected: " + clr)
gui.runapp(form)
Below is the complete EasyBite GUI library reference organized into categories. Each category is a Markdown table listing Function, Parameters, and Description.
Form Creation and Management
| Function | Parameters | Description |
|---|---|---|
createform | title (String), width (Number), height (Number) | Creates a new form with the specified title and dimensions. Returns a FormObject. |
runapp | form_id (FormObject) | Runs the application with the specified form as the main window. |
setresizable | form_id (FormObject), resizable (Bool) | Sets whether the form can be resized by the user. |
getresizable | form_id (FormObject) | Returns whether the form is resizable (true or false). |
setstartposition | form_id (FormObject), position (String: "centerscreen"/"manual") | Sets the form’s starting position. |
getstartposition | form_id (FormObject) | Returns the form’s starting position as a string. |
setfullscreen | form_id (FormObject), fullscreen (Bool) | Toggles fullscreen mode. |
getfullscreen | form_id (FormObject) | Returns whether the form is in fullscreen mode. |
setposition | form_id (FormObject), x (Number), y (Number) | Sets the form’s position (when start position is "manual"). |
setmaximized | form_id (FormObject), maximized (Bool) | Toggles maximized state. |
getmaximized | form_id (FormObject) | Returns whether the form is maximized. |
setborder | form_id (FormObject), border (Bool) | Toggles the form’s border. |
getborder | form_id (FormObject) | Returns whether the form has a border. |
showform | form_id (FormObject) | Makes the form visible. |
hideform | form_id (FormObject) | Hides the form. |
exit | — | Exits the running application. |
restore | form_id (FormObject) | Restores from maximized/fullscreen to normal. |
closeform | form_id (FormObject) | Closes and removes the form. |
Control Creation
Below are two comprehensive Markdown tables:
- Control Creation – every GUI‐element constructor
- General Control Properties – all common getters/setters and layout helpers
Control Creation
| Function | Parameters | Description |
|---|---|---|
form | title (String), width (Number), height (Number) | Creates a new window/form. Returns a FormObject. |
listbox | form_idOptional: x,y,width,height (Number), items (Array of String), multiselect (Bool) | Creates a listbox control. Returns a control ID. |
combobox | form_idOptional: same as listbox | Creates a dropdown/combo control. Returns a control ID. |
label | form_id, textOptional: x,y,width,height (Number), autosize (Bool), fontname (String),fontsize (Number), fontweight (String), forecolor,backcolor (String) | Creates a text label. Returns a control ID. |
button | form_id, textOptional: callback (Function), same layout & style params as label | Creates a clickable button. |
textbox | form_id, textOptional: same as label | Creates a text‐entry box. |
checkbox | form_id, textOptional: same as label, checked (Bool) | Creates a checkbox. |
radiobox | form_id, text, groupOptional: same as checkbox | Creates a radio‐button in a group. |
groupbox | form_id, titleOptional: x,y,width,height (Number), border (Bool) | Creates a framed container. |
panel | form_idOptional: same as groupbox minus title | Creates a plain container. |
card | form_idOptional: x,y,width,height (Number) | Creates a shadowed panel. |
sidebar | form_idOptional: x (Number), width (Number), dock (String: "left"/"right") | Creates a docked sidebar. |
pages | form_idOptional: page_titles (Array), default_panel (Bool), x,y,width,height (Number) | Creates a tab control. |
picturebox | form_idOptional: x,y,width,height (Number) | Displays an image. |
progressbar | form_idOptional: x,y,width,height (Number) | Shows progress. |
scrollbar | form_id, orientation (String: "horizontal"/"vertical")Optional: x,y,width,height (Number) | Adds a scrollbar. |
timer | Optional: interval (Number, ms), callback (Function) | Creates a timer. |
datetimepicker | form_idOptional: x,y,width,height (Number), format (String) | Date & time selector. |
timepicker | form_idOptional: same as datetimepicker | Time‐only selector. |
table | form_idOptional: x,y,width,height (Number), fontname (String), fontsize (Number),forecolor,backcolor (String), text_alignment (String) | Creates a data grid. |
menu | form_idOptional: x,y,width (Number) | Adds a menu bar. |
separator | form_idOptional: orientation (String), x,y,width,height (Number) | Inserts a separator line. |
gridlayout | form_idOptional: rows,cols (Number), x,y,width,height (Number), show_grid_lines (Bool) | Grid–based layout. |
flowlayout | form_idOptional: x,y,width,height (Number) | Flow (wrapping) layout. |
verticallayout | form_idOptional: x,y,width,height (Number) | Vertical stack layout. |
horizontallayout | form_idOptional: same as flowlayout | Horizontal stack layout. |
shape | form_idOptional: x,y,width,height (Number), border_style (String) | Drawing canvas (turtle). |
treeview | form_idOptional: x,y,width,height (Number) | Hierarchical tree. |
slider | form_id, orientation (String)Optional: x,y,width,height (Number) | Slider control. |
richtext | form_idOptional: x,y,width,height (Number) | Rich‐text editor. |
toolbar | form_idOptional: x,y,width (Number) | Toolbar container. |
toolbaritem | — | Adds an item to a toolbar. |
statusbar | form_idOptional: text (String), x,y,width (Number) | Bottom status display. |
imagebutton | form_idOptional: x,y,width,height (Number) | Clickable image. |
colordialog | form_id | Color‐picker dialog. |
General Control Properties
| Function | Parameters | Description |
|---|---|---|
settext | id, text (String) | Set control or form title text. |
gettext | id | Get control or form title text. |
setx / getx | control_id, x (Number) | Set/get X position (manual layout). |
sety / gety | control_id, y (Number) | Set/get Y position (manual layout). |
setwidth / getwidth | control_id, width (Number) | Set/get width. |
setheight / getheight | control_id, height (Number) | Set/get height. |
setfontsize / getfontsize | control_id, size (Number) | Set/get font size. |
setfontname / getfontname | control_id, name (String) | Set/get font family. |
setfontweight / getfontweight | control_id, weight (String) | Set/get font weight. |
settextcolor / gettextcolor | control_id, color (String) | Set/get text color. |
setbackcolor / getbackcolor | id, color (String) | Set/get background color. |
setvisibility / getvisibility | control_id, visible (Bool) | Show/hide. |
setenabled / getenabled | control_id, enabled (Bool) | Enable/disable. |
setautosize / getautosize | control_id, autosize (Bool) | Toggle autosizing. |
setdock / getdock | control_id, dock (String) | Docking style (top, bottom, left, right, fill). |
setpadding | control_id, left,top,right,bottom (Number) | Inner padding. |
setmargin | control_id, left,top,right,bottom (Number) | Outer margin. |
settextalignment | control_id, alignment (String) | Text alignment (center, topleft, etc.). |
setclickhandler | control_id, callback (Function) | Button/imagebutton click event. |
treeviewevent | treeview_id, event_type, callback | Treeview event (e.g., doubleclick). |
addto | container_id, control_id | Add control into a container/layout. |
addtopage | pages_id, page_index, control_id | Add control to a tab page. |
setlayoutcells | layout_id, row, col, control_id | Place control in a grid cell. |
setspacing / getspacing | layout_id, spacing (Number) | Set/get gap in flow/grid layouts. |
setleft / setright / setabove / setbelow | control_id, target_id, Optional: space (Number) | Position relative to another control. |
alert / getalertresult | message, Optional: title,buttons,icon / msgbox_id | Show message box / get user’s choice. |
openfiledialog / savefiledialog / folderdialog | Optional: title, multiselect, startingpath, filters | File/folder pickers. |
setdialogtitle / getdialogtitle | title / — | Set/get upcoming dialog title. |
setmultiselect / getmultiselect | multiselect (Bool) / — | Toggle/get multi‐file select. |
setstartingpath / getstartingpath | path (String) / — | Set/get dialog start folder. |
setfilters / getfilters | filters (Array) / — | Set/get file‐type filters. |
showcolordialog / getcolor | colordialog_id / colordialog_id, Optional: format | Color‐picker / retrieve color (“rgb”/“hex”). |
General Control Properties
| Function | Parameters | Description |
|---|---|---|
settext | id, text (String) | Sets text of a control or form title. |
gettext | id | Gets text of a control or form title. |
setx / getx | control_id, x (Number) | Sets/gets x-position (resets layout). |
sety / gety | control_id, y (Number) | Sets/gets y-position (resets layout). |
setwidth / getwidth | control_id, width (Number) | Sets/gets width. |
setheight / getheight | control_id, height (Number) | Sets/gets height. |
setfontsize / getfontsize | control_id, size (Number) | Sets/gets font size. |
setfontname / getfontname | control_id, name (String) | Sets/gets font name. |
setfontweight / getfontweight | control_id, weight (String) | Sets/gets font weight. |
settextcolor / gettextcolor | control_id, color (String) | Sets/gets text color. |
setbackcolor / getbackcolor | id, color (String) | Sets/gets background color. |
setvisibility / getvisibility | control_id, visible (Bool) | Sets/gets visibility. |
setenabled / getenabled | control_id, enabled (Bool) | Sets/gets enabled state. |
setautosize / getautosize | control_id, autosize (Bool) | Sets/gets autosize. |
setdock / getdock | control_id, dock (String) | Sets/gets docking style. |
setpadding | control_id, left,top,right,bottom (Number) | Sets internal padding. |
setmargin | control_id, left,top,right,bottom (Number) | Sets external margin. |
settextalignment | control_id, alignment (String) | Sets text alignment. |
Event Handling
| Function | Parameters | Description |
|---|---|---|
setclickhandler | control_id, callback (Function) | Sets click callback for buttons/imagebuttons. |
treeviewevent | treeview_id, event_type, callback | Sets handler for treeview events (e.g. "doubleclick"). |
Layout and Positioning
| Function | Parameters | Description |
|---|---|---|
setleft | control_id, target_id, Optional: space (Number) | Position control to the left of another. |
setright | control_id, target_id, Optional: space (Number) | Position control to the right of another. |
setabove | control_id, target_id, Optional: space (Number) | Position control above another. |
setbelow | control_id, target_id, Optional: space (Number) | Position control below another. |
addto | container_id, control_id | Adds a control into a container. |
addtopage | pages_id, page_index, control_id | Adds a control to a specific tab page. |
setlayoutcells | layout_id, row, col, control_id | Places a control in a grid cell. |
setspacing | layout_id, spacing (Number) | Sets spacing between controls in a layout. |
getspacing | layout_id | Gets spacing setting. |
Dialogs and User Interaction
| Function | Parameters | Description |
|---|---|---|
alert | message (String), Optional: title, buttons, icon (String) | Shows a message box. Returns a message ID. |
getalertresult | msgbox_id | Gets user response (e.g. "Ok", "Yes"). |
openfiledialog | Optional: title, multiselect (Bool), startingpath (String), filters (Array) | Opens file-picker. |
savefiledialog | Optional: same as openfiledialog | Opens save-file dialog. |
folderdialog | Optional: same as openfiledialog | Opens folder-picker. |
setdialogtitle | title (String) | Sets next dialog’s title. |
setmultiselect | multiselect (Bool) | Toggles multi-select. |
setstartingpath | path (String) | Sets starting directory for dialogs. |
setfilters | filters (Array) | Sets file-type filters (e.g. [["Text",["txt"]]]). |
getdialogtitle | — | Gets current dialog title. |
getmultiselect | — | Gets multi-select state. |
getstartingpath | — | Gets current starting path. |
getfilters | — | Gets current file filters. |
showcolordialog | colordialog_id | Opens color-picker dialog. |
getcolor | colordialog_id, Optional: format ("rgb" / "hex") | Gets selected color. |
ListBox & ComboBox Functions
| Function | Parameters | Description |
|---|---|---|
additem | control_id, items (String or Array), Optional: index (Number) | Adds items to list/combobox. |
getitem | control_id, index (Number) | Gets an item by index. |
setselectedindex | control_id, index (Number) | Selects item by index. |
getselectedindex | control_id | Gets selected index. |
setselectedtext | control_id, text (String) | Selects item by matching text. |
getselectedtext | control_id | Gets selected item text. |
TreeView Functions
| Function | Parameters | Description |
|---|---|---|
nodeitem | treeview_id, text (String), Optional: parent_id | Adds a node. Returns a node ID. |
getnodeitem | treeview_id, node_id | Gets node details. |
getselectednode | treeview_id | Gets selected node ID or null. |
setselectednode | treeview_id, node_id | Selects a node. |
setnodeicon | treeview_id, node_id, icon_path (String/null) | Sets or clears node icon. |
setnodecheckbox | treeview_id, node_id, checked (Bool/null) | Toggles node checkbox. |
Slider Functions
| Function | Parameters | Description |
|---|---|---|
setvalue | control_id, value (Number) | Sets slider value. |
getvalue | control_id | Gets slider value. |
setmin | control_id, min (Number) | Sets minimum. |
getmin | control_id | Gets minimum. |
setmax | control_id, max (Number) | Sets maximum. |
getmax | control_id | Gets maximum. |
ProgressBar Functions
| Function | Parameters | Description |
|---|---|---|
setvalue | control_id, value (Number) | Sets progress. |
getvalue | control_id | Gets progress. |
setmin | control_id, min (Number) | Sets minimum. |
getmin | control_id | Gets minimum. |
setmax | control_id, max (Number) | Sets maximum. |
getmax | control_id | Gets maximum. |
setbarcolor | control_id, color (String) | Sets bar color. |
getbarcolor | control_id | Gets bar color. |
setbarstyle | control_id, style (String) | Sets style ("solid"/"marquee"). |
getbarstyle | control_id | Gets style. |
PictureBox Functions
| Function | Parameters | Description |
|---|---|---|
setimage | control_id, path (String) | Sets image file. |
setsizemode | control_id, mode (String) | Sets display mode. |
Timer Functions
| Function | Parameters | Description |
|---|---|---|
setinterval | timer_id, interval (Number) | Sets timer interval (ms). |
getinterval | timer_id | Gets timer interval. |
settimerenabled | timer_id, enabled (Bool) | Enables/disables timer. |
gettimerenabled | timer_id | Gets enabled state. |
starttimer | timer_id | Starts timer. |
stoptimer | timer_id | Stops timer. |
DatePicker & TimePicker Functions
| Function | Parameters | Description |
|---|---|---|
setdate | control_id, datetime (String) | Sets date/time. |
getdate | control_id | Gets date/time. |
settime | control_id, time (String) | Sets time. |
gettime | control_id | Gets time. |
Menu Functions
| Function | Parameters | Description |
|---|---|---|
menuitem | menu_id, label (String), Optional: callback, children (Array), icon (String) | Adds a menu item. |
submenuitem | menu_id, menu_item_name, submenu_name, Optional: callback, children, separator (Bool), icon | Adds a submenu. |
separator | — | Adds a separator to the last modified menu. |
setmenuicon | menu_id, menu_item_label, icon_path (String/null) | Sets or clears menu item icon. |
getmenuicon | menu_id, menu_item_label | Gets menu item icon path or null. |
Table Functions
| Function | Parameters | Description |
|---|---|---|
settabledata | table_id, headers (Array), rows (Array) | Sets headers and row data. |
gettabledata | table_id | Gets [headers, rows] array. |
Shape (Drawing) Functions
| Function | Parameters | Description |
|---|---|---|
forward | shape_id, distance (Number) | Moves cursor forward. |
towardleft | shape_id, angle (Number) | Rotates cursor left. |
towardright | shape_id, angle (Number) | Rotates cursor right. |
goto | shape_id, x, y (Number) | Moves cursor to coordinates. |
penup | shape_id | Lifts pen (no drawing). |
pendown | shape_id | Lowers pen (start drawing). |
pencolor | shape_id, color (String) | Sets pen color. |
beginfill | shape_id | Starts fill. |
endfill | shape_id | Ends fill. |
circle | shape_id, radius (Number), Optional: extent (Number) | Draws circle/arc. |
speed | shape_id, speed (Number 0–10) | Sets drawing speed. |
Layout Control Functions
| Function | Parameters | Description |
|---|---|---|
showgridlines | layout_id, show (Bool) | Toggles grid lines. |
getgridlines | layout_id | Gets grid-line visibility. |
setlayoutrows | layout_id, rows (Number) | Sets number of rows. |
getlayoutrows | layout_id | Gets number of rows. |
setlayoutrow | layout_id | Adds a row. |
setlayoutcolumn | layout_id | Adds a column. |
setlayoutcolumns | layout_id, columns (Number) | Sets number of columns. |
getlayoutcolumns | layout_id | Gets number of columns. |