From Xojo Documentation

Class (inherits from RectControl)

Allows the user to browse among records in a database table by clicking buttons. It consists of First Record, Previous Record, Next Record, and Last Record navigation buttons and a label that displays the Caption property. Built-in events fire when the user clicks any button. Methods allow you to navigate among rows programmatically.

Close Insert MoveLast
ConstructContextualMenu KeyDown MoveNext
ContextualMenuAction KeyUp MovePrevious
Delete MouseEnter Open
DragEnter MouseExit Reposition
DragExit MouseMove Update
DragOver MouseWheel Validate
DropObject MoveFirst

Active fa-lock-32.png LockBottom RecordSet fa-lock-32.png
AutoDeactivate LockLeft SQLQuery
Caption LockRight Scope fa-lock-32.png
Commit LockTop TabIndex
Database MouseCursor TabStop
Enabled MouseX fa-lock-32.png TableName
Encoding MouseY fa-lock-32.png Top
Handle fa-lock-32.png Name Transparent
Height PanelIndex TrueWindow fa-lock-32.png
HelpTag Parent Visible
Index fa-lock-32.png ReadOnly Width
Left RecordLocked Window fa-lock-32.png

AcceptFileDrop Insert RecordCount
AcceptPictureDrop Invalidate Refresh
AcceptRawDataDrop MoveFirst RefreshRect
AcceptTextDrop MoveLast Row
Close MoveNext RowCount
Delete MovePrevious RunQuery
DrawInto MoveTo SetFocus
FieldCount NewRecord Update


A DataControl is designed to display data using Checkboxes, TextFields and TextAreas, ListBoxes, Labels PopupMenus, and ComboBoxes. You can also create custom classes that are based on any of these classes and use them in conjunction with a DataControl.

Each of these controls (or their subclasses) has two properties that are specific to the DataControl: DataSource and DataField. DataSource accepts a DataControl object and DataField accepts the name of a field in the table to which the DataControl is linked. You set up a database interface by linking a DataControl to a table in a database and then linking each field whose values you wish to display to a Checkbox, TextField or TextArea, ListBox, Label, PopupMenu or ComboBox using the DataField and DataSource properties.

This control provides only limited functionality for working with a database. In general it is recommended you connect to the specific database and use the SQLSelect and SQLExecute methods.

See Also

Database, DatabaseField, DatabaseRecord, RecordSet classes.