From 3815a3616f2000a8656cb49e6ae67c9a7969bbab Mon Sep 17 00:00:00 2001 From: mattias Date: Mon, 16 Feb 2009 16:12:49 +0000 Subject: [PATCH] LCL: TCustomMemo: added switch -dEnableMemoTextStrings to use TTextStrings in TCustomMemo git-svn-id: trunk@18710 - --- lcl/include/custommemo.inc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lcl/include/custommemo.inc b/lcl/include/custommemo.inc index dd27110f25..9867fb8119 100644 --- a/lcl/include/custommemo.inc +++ b/lcl/include/custommemo.inc @@ -34,7 +34,11 @@ begin FWantTabs := false; FWordWrap := True; //FLines := TMemoStrings.Create(Self); - FLines := TStringList.Create; //TODO finish TTextStrings and add them here instead of TStringList + {$IFDEF EnableMemoTextStrings} + FLines := TTextStrings.Create; + {$ELSE} + FLines := TStringList.Create; + {$ENDIF} //TMemoStrings(FLines).MemoWidgetClass := TWSCustomMemoClass(WidgetSetClass); FVertScrollbar := TMemoScrollBar.Create(Self, sbVertical); FHorzScrollbar := TMemoScrollBar.Create(Self, sbHorizontal); @@ -138,7 +142,11 @@ var begin if Assigned(FLines) then begin // create internal item list - NewStrings:= TStringList.Create; + {$IFDEF EnableMemoTextStrings} + NewStrings := TTextStrings.Create; + {$ELSE} + NewStrings := TStringList.Create; + {$ENDIF} // copy items (text+objects) from the interface items list NewStrings.Assign(Lines);