LCL: TCustomMemo: added switch -dEnableMemoTextStrings to use TTextStrings in TCustomMemo

git-svn-id: trunk@18710 -
This commit is contained in:
mattias 2009-02-16 16:12:49 +00:00
parent 06cd260566
commit 3815a3616f

View File

@ -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);