Table
A Table Object represents a structured grid of rows and columns used for defining input, output, or displaying numerical data in tabular form. The figure below shows an example of a user interface of an app with a table object used to accept input in three columns.
The figure below shows the corresponding form object and its Settings window.
In this example, the data source references three 1D string arrays. You can select any type of array as the source and then click Add to Table.
Three checkboxes control the overall appearance of the table:
The Automatically add new rows checkbox ensures that an additional empty row is always available when a user is filling out a table. If all of the 1D string arrays, which are used as a source to the table, have nonempty values for New element value in their declaration Settings window, then this functionality is deactivated. In this case, new rows can only be added by clicking the Add button in the associated table toolbar, if such a button has been made available.
The Sortable checkbox makes it possible to sort the table with respect to a particular column by clicking the corresponding column header.
The Sources section contains a table with five columns:
Each row in this table defines a column in the table object. The option Grow allows individual columns to grow when a form is resized. This option is only applicable to grid mode and if the Horizontal alignment of the table is set to Fill.
In the example, the string arrays define the initial values for the rows corresponding to the three columns, as shown in the figure below:
You can control which source that determines the number of rows in the table. To set this, right-click the corresponding array declaration in the Sources section and select Set as Synchronizing Source.
Toolbar
In this section, you can select which toolbar items (buttons) should be used to control the contents of the table. The Position list defines the location of the toolbar relative to the table and provides the following options:
The Icon size setting allows you to choose Small or Large icons.
To add an item to the toolbar, click the Add Toolbar Item button below the table.
The following dialog is then shown.
You can always add the following items:
In addition, you can add customized items by clicking Custom Item or Custom Toggle Item in the Toolbar Items dialog. The figure below shows the Edit Custom Toolbar Item dialog used to define a customized button. The dialog has two tabs for a regular item and three tabs for a toggle item.
The Choose commands to run tab is similar to that of menu, ribbon, and toolbar items, as well as buttons.
The Load from File and Save to File buttons are used to load and save from/to the following file formats:
Microsoft® Excel Workbook (.xlsx)
-
This is shown in the figure below.
The allowed separators are comma, semicolon, and tab for CSV files, and space and tab for DAT and TXT files.