From Xojo Documentation
Jump to: navigation, search

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 ReadOnlyProperty.png LockBottom RecordSet ReadOnlyProperty.png
AutoDeactivate LockLeft SQLQuery
Caption LockRight Scope ReadOnlyProperty.png
Commit LockTop TabIndex
Database MouseCursor TabStop
Enabled MouseX ReadOnlyProperty.png TableName
Encoding MouseY ReadOnlyProperty.png Top
Handle ReadOnlyProperty.png Name Transparent
Height PanelIndex TrueWindow ReadOnlyProperty.png
HelpTag Parent Visible
Index ReadOnlyProperty.png ReadOnly Width
Left RecordLocked Window ReadOnlyProperty.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.

NOTE: 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.

Personal tools

Starting Out
Dig Deeper
More Help