Difference between revisions of "Label.DataSource"

From Xojo Documentation

m (Text replacement - "{{Deprecated|" to "{{DeprecatedItem|")
 
Line 1: Line 1:
{{Deprecated|version=2018r4}}
+
{{DeprecatedItem|version=2018r4}}
  
 
{{PropertyBox
 
{{PropertyBox

Latest revision as of 19:05, 3 September 2020

Property (As String )
aLabel.DataSource = newStringValue
or
StringValue = aLabel.DataSource

Supported for all project types and targets.

The table in a database whose fields are displayed (TableName as String).

Notes

If assigned in code, you use the Name property of a DataControl. Use the DataField property to link a field to be displayed to a Label. In the IDE, a popup menu of field names will appear. Database fields can also be displayed using TextFields and TextAreas, PopupMenus, and ListBoxes.

Sample Code

This code sets the DataSource and DataField properties of the control.

Me.DataSource = "Movies"
Me.DataField = "Director"