From Xojo Documentation

Property (As String )
aListBox.DataSource = newStringValue
StringValue = aListBox.DataSource

Supported for all project types and targets.

The DataControl that references a table in a database whose fields are displayed using the ListBox.


Use the DataField property to link the field to be displayed to the ListBox. In the IDE, a popup menu of field names will appear. When set in code, it takes a String, e.g.,

ListBox1.DataSource = "DataControl1"