diff --git a/components/industrialstuff/source/indlcddisplay.pas b/components/industrialstuff/source/indlcddisplay.pas index dd35aec86..c5ab79353 100644 --- a/components/industrialstuff/source/indlcddisplay.pas +++ b/components/industrialstuff/source/indlcddisplay.pas @@ -95,7 +95,7 @@ type FLenText: integer; FDisplayLineCount: integer; FDisplayCharCount: integer; - FLines: TStringList; + FLines: TStrings; FCharSpace: boolean; FColorScheme: TColorScheme; FCountOn: integer; @@ -123,7 +123,7 @@ type function GetGlobalDotColsCount: longint; procedure SetDisplayLineCount(const Value: integer); procedure SetDisplayCharCount(const Value: integer); - procedure SetLines(const Value: TStringList); + procedure SetLines(const Value: TStrings); procedure SetDotColorOff(const Value: TColor); procedure SetDotColorOn(const Value: TColor); procedure SetBoardColor(const Value: TColor); @@ -217,7 +217,7 @@ type // The text to display // It will be truncated according // to ScreenRowCount and ScreenColCount - property Lines: TStringList read FLines write SetLines; + property Lines: TStrings read FLines write SetLines; // Insert one-dot space between chars property CharSpace: boolean read FCharSpace write SetCharSpace default False; // Pre-defined color schemes @@ -623,6 +623,17 @@ begin end; +{ TLCDDisplayStrings } + +type + TLCDDisplayStrings = class(TStrings) + private + FOnChange: TNotifyEvent; + public + property OnChange: TNotifyEvent read FOnChange write FOnChange; + end; + + { TLCDDisplay} constructor TLCDDisplay.Create(AOwner: TComponent); @@ -655,7 +666,7 @@ begin FCountOn := 255; FLines := TStringList.Create; - FLines.OnChange := @LinesChanged; + TStringList(FLines).OnChange := @LinesChanged; AutoSize := true; end; @@ -1312,7 +1323,7 @@ begin UpdateSize; end; -procedure TLCDDisplay.SetLines(const Value: TStringList); +procedure TLCDDisplay.SetLines(const Value: TStrings); var i: integer; begin