Listbox
The data table. It shows a selection of records in columns, with sorting, search, paging, row selection and per-column events. It is the richest block of the component — enough to have its own page in the mechanisms section.
What it is
| Type | listbox |
| Category | others |
| Children allowed | 0 |
| Styling targets | bspk |
| Events | onSelect, onSelectRows, onDoubleClick |
The settings
Only the settings specific to this block are listed here. The block name, HTML id, anchor, conditional display and repetition are shared by every block and described once, under Shared settings.
Parameters
| Setting | How it is set | What it does | Specifics |
|---|---|---|---|
First requestvt_FirstRequest | text (text) | 4D expression evaluated on first load to build the list — e.g. ds.MY_TABLE.query(…). Empty with a table selected, the listbox takes every record. With no table, the expression must return a collection. | accepts 4D |
Custom sortvt_FunctionSort | text (text) | Replaces the standard sort when a column header is clicked. Careful: it also runs on first load, where This.vo_POST.sortableColumn is empty — handle that case, otherwise the expression fails and the list stays empty. | accepts 4D |
Relationship pathvt_RelatedEntities | text (text) | 4D expression providing the list directly — e.g. vo_selectedItemData.Entity.MyLines. If a first request shaped like ds.….query(…) is also set, the two are combined. Handle the 'nothing selected' case. | accepts 4D |
Tablevt_TableName | select (text) | — | HTML attribute |
Search zone
| Setting | How it is set | What it does | Specifics |
|---|---|---|---|
Search only with my functionvb_OnlyUseMySeachFunction | toggle (boolean) | — | default: no |
Hide listbox on startupvb_hideListboxAtStart | toggle (boolean) | — | default: no |
Search functionvt_SearchFunction | text (text) | Receives the current selection and the entered values, and returns the filtered selection — e.g. ds.MY_TABLE.mySearch(This.Selection; This.vo_POST). Left empty, a generic filter matches each search field against the field of the same name. | accepts 4D |
Block hidden when listbox is displayedvt_WrapperReplaceHiddenListbox | select (text) | — | |
Search containervt_searchwrapper | select (text) | Container block (container, accordion or modal) holding the search fields. Each field is identified by its name, which is what the search function reads back. With no container set, typing filters nothing. | HTML attribute |
Display columns parameters
| Setting | How it is set | What it does | Specifics |
|---|---|---|---|
Table with the fields to be displayedvc_FieldDisplay | columnList (collection) | — | |
Dynamic columnsvt_DynamicColumnsFunction | text (text) | Receives the column collection and returns it modified — to build columns only known at runtime, one per language for instance. Short form accepted: Class.myFunction. | accepts 4D |
Display properties
| Setting | How it is set | What it does | Specifics |
|---|---|---|---|
Allow multiple selectionvb_DisplayCheckbox | toggle (boolean) | — | default: yes |
Display Headersvb_DisplayHead | toggle (boolean) | — | default: yes |
Show the countervb_DisplayResults | toggle (boolean) | Shows the counter above the list: 'Total: N results', and 'N results out of M' as soon as a search filters. | default: yes |
Number of lines to displayvl_DisplayLine | number (integer) | — | default: 0 |
Items per loadvl_LengthByPage | number (integer) | Size of one batch loaded at a time, not the number of visible rows. A first batch loads up front, the next ones as you scroll — or page by page in Pagination mode. | HTML attribute, default: 0 |
Minimum number of lines to displayvl_MinDisplayLine | number (integer) | — | default: 0 |
Display conditionvt_ConditionDisplayCheckbox | text (text) | 4D expression evaluated on every render: the boxes appear only if it returns true. If it fails or returns anything other than a boolean, the boxes stay visible. | accepts 4D |
Display typevt_DisplayListboxType | checkbox (enum) | Free height: the list stretches. Fixed height: fixed size and the list scrolls. Pagination: page-by-page navigation. To the bottom of the screen: the list fills the space left below it. | HTML attribute |
Display lines properties
| Setting | How it is set | What it does | Specifics |
|---|---|---|---|
Even row colorvt_EvenColor | color (text) | — | |
Hover colorvt_HoverRowBackgroundColor | color (text) | — | |
Text hover colorvt_HoverRowTextColor | color (text) | — | |
Odd row colorvt_OddColor | color (text) | — | |
Selected row background colorvt_SelectedRowBackgroundColor | color (text) | — | |
Selected row text colorvt_SelectedRowTextColor | color (text) | — |
Card mode
| Setting | How it is set | What it does | Specifics |
|---|---|---|---|
Gap between cardsvl_CardGap | number (integer) | Space between cards, in pixels, both horizontally and vertically. Empty: 12 px. | |
Cards per rowvl_CardsPerRow | number (integer) | How many cards are shown side by side in the list once the display switches to cards. Empty or 1: one card per row. | |
Field columns inside the cardvl_TemplateColumns | number (integer) | Layout of the fields INSIDE a card: how many columns to spread them over. Empty or 1: fields are stacked. | |
Switch to card below :vt_BreakPointCard | select (enum) | — | |
Field label positionvt_CardLabelLayout | select (enum) | Inside a card, put the column label above its value or on the same line. | default: column |
The tables on this page are produced automatically from the block's schema. If this page and the panel disagree, the schema is right.

