procedure ReadState(Reader: TReader); override;
virtual void __fastcall ReadState(System::Classes::TReader* Reader);
Prepares the control for having its properties assigned values read from a stream.
ReadState is part of a sequence of calls used by the streaming system that loads and saves component state. It reads the values of all the control's published properties, stored data, and owned components from the reader object passed in Reader.
Override ReadState to change the preparations the control makes as it readies itself to have its property values assigned from a stream. For example, a control might destroy temporary internal data structures or objects before new instances are loaded from the stream. Remember to include a call to the inherited class's method when overriding ReadState.
As implemented in TControl, ReadState assigns the Reader parameter's Parent property to the control's own Parent property before calling the inherited ReadState method of TComponent. Finally, ReadState synchronizes the Font, Color, and ShowHint properties with the parent control, as indicated by the ParentFont, ParentColor, and ParentShowHint properties, respectively.