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

# TComponent.ReadState

Read the component's state from a stream.

## Declaration

`protected procedure TComponent.ReadState(`
`Reader: TReader`
`); virtual;`

## Description

ReadState reads the component's state from a stream through the reader object reader. Values for all published properties of the component can be read from the stream. Normally there is no need to call ReadState directly. The streaming system calls ReadState itself.

The TComponent implementation of ReadState simply calls TReader.ReadData Descendent classes can, however, override ReadStateto provide additional processing of stream data.

## See also

TComponent.WriteState |  | Writes the component to a stream.
TStream.ReadComponent |  | Reads component data from a stream
TReader.ReadData |  | Reads the components data after it has been created.