From Xojo Documentation

Revision as of 17:16, 26 October 2018 by PLefebvre (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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
AllowAutoDeactivate LockLeft SQLQuery
AllowTabStop LockRight Scope fa-lock-32.png
Caption LockTop TabIndex
Commit MouseCursor TableName
Database MouseX fa-lock-32.png Tooltip
Enabled MouseY fa-lock-32.png Top
Encoding Name fa-lock-32.png Transparent
Handle fa-lock-32.png PanelIndex TrueWindow fa-lock-32.png
Height Parent Visible
Index fa-lock-32.png ReadOnly Width
Left RecordLocked Window fa-lock-32.png

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


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.