AxForm type
Namespace Form
The form namespace contains functions and objects for working with UI elements such as buttons, input fields, tables, and dialogs.
All visual elements have the following methods:
void setEnabled(bool enable)- ifenable== true the element will be enabled, otherwise it will be disabled.void setVisible(bool enable)- ifenableis true the element will be visible, otherwise it will be hidden.bool getEnabled()- returns true if the element is enabled.bool getVisible()- returns true if the element is visible.
Connect
AxScript uses QT signal-slot technology. A signal is emitted when a particular event occurs. A slot is a function that is called in response to a particular signal. Qt's signals and slots mechanism ensures that if you connect a signal to a slot, the slot will be called with the signal's parameters at the right time. Signals and slots can take any number of arguments of any type. They are completely type safe.
You can connect as many signals as you want to a single slot, and a signal can be connected to as many slots as you need. It is even possible to connect a signal directly to another signal. (This will emit the second signal immediately whenever the first is emitted.)
form.connect(element elem, string signal, function(){}) - Creates a connection from the signal in the elem object to the function handler.
Example
let btn = form.create_button("Send signal");
form.connect(btn, "clicked", function(){
ax.show_message("test", "Clicked signal");
});
let layout = form.create_vlayout();
layout.addWidget(btn);
let dialog = form.create_dialog("");
dialog.setLayout(layout);
dialog.exec()
Container
To retrieve data in JSON format from input elements, you must use a container object.
Methods:
VLayout / HLayout
The vlayout class lines up elements vertically. The hlayout class lines up elements horizontally.
To create a vlayout/hlayout element, use the form.create_vlayout() / form.create_hlayout() function.
Methods:
GridLayout
The gridlayout class lays out elements in a grid.
To create a gridlayout element, use the form.create_gridlayout() function.
Methods:
VLine / HLine
The line element is a simple divider cover.
To create a vline / hline element, use the form.create_vline() / form.create_hline() function.
VSpacer / HSpacer
The spacer element provides blank space in a layout. Normally, you don't need to use this element directly.
To create a vspacer / hspacer element, use the form.create_vline() / form.create_hline() function.
Label
The label element provides a text display.
element create_label(string text = "") - Constructs a label that displays the text, text.
Methods:
TextLine
The textline element is a one-line text editor.
element create_textline(string text = "") - Constructs a textline containing the text, text.
Methods:
Signals:
TextMulti
The textmulti element provides a widget that is used to edit and display text.
element create_textmulti(string text = "") - Constructs a textmulti containing the text, text.
Methods:
DateLine
The dateline element provides a widget for editing dates.
element create_dateline(string format = "dd.MM.yyyy") - Constructs a dateline. The format used to display the date of the date edit.
Methods:
TimeLine
The timeline element provides a widget for editing times.
element create_dateline(string format = "HH:mm.yyyy") - Constructs a timeline. The format used to display the time of the time edit.
Methods:
Combo
The combo element combines a button with a dropdown list.
element create_combo() - Constructs a combo.
Methods:
Signals:
Spin
The spin element provides a spin box widget.
element create_spin() - Constructs a spin with 0 as minimum value and 99 as maximum value, a step value of 1. The value is initially set to 0.
Methods:
Signals:
Check
The check element provides a checkbox with a text label.
element create_check(string label= "") - Constructs a checkbox with the given text.
Methods:
Signals:
Button
The button element provides a command button.
element create_button(string text= "") - Constructs a button with the text text.
Signals:
List
The list element provides an item-based list widget.
element create_list() - Constructs an empty list.
Methods:
Signals:
Table
The table elements provides an item-based table view.
element create_table(string[] headers) - Creates a new table view with the given headers.
Methods:
Signals:
Panel
The panel element provides a placement of other elements using layout.
element create_panel() - Constructs a panel.
Methods:
GroupBox
The groupbox element provides a group box frame with a title.
element create_groupbox(string title, bool checkable) - Constructs a groupbox with the given title. Property checkable holds whether the group box has a checkbox in its title.
Methods:
Signals:
ScrollArea
The scrollarea element provides a scrolling view onto another elements.
element create_scrollarea() - Constructs an empty scrollarea.
Methods:
VSplitter / HSplitter
The splitter element implements a splitter widget.
To create a vsplitter / hsplitter element, use the create_vsplitter() / form.create_hsplitter() function.
Methods:
Signals:
Tabs
The tabs element provides a stack of tabbed widgets.
element form.create_tabs() - Constructs a tabs element.
Methods:
Stack
The stack element provides a stack of widgets where only one widget is visible at a time.
element create_stack() - Constructs a stack.
Methods:
Signals:
Dialog
The dialog element is implement of dialog windows.
dialog create_dialog(string title) - Constructs a dialog with title.
Methods:
Last updated




















