[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'Forms' (#lcl)

# TScreen.DataModules

Provides indexed access to data modules on the screen.

## Declaration

Source position: forms.pp line 1291

`public property TScreen.DataModules[Index: Integer] : TDataModule read GetDataModules;`

## Description

DataModules is a read-only indexed TDataModule property which provides access to a data module by its ordinal position in the list. Data modules are a non-visual component at run-time, and are provided to maintain compatibility with the Delphi VCL equivalent.

Index contains the ordinal position in the list for the property value, and must be in the range 0..DataModuleCount-1. An EListError exception is raised if Index has an invalid position for the list.

Use DataModuleCount to get the number of data module instances in the property.

## See also

TScreen.DataModuleCount |  | The number of data modules for the screen.
TDataModule