RxFPC:try to fix show spshial chars in RxDBGrid on display memo text fields

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@8195 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
alexs75
2022-02-06 20:23:06 +00:00
parent 4ecc4a179a
commit 786d845d52
2 changed files with 10 additions and 2 deletions

View File

@ -70,3 +70,4 @@
{$DEFINE RX_USE_DELPHI_EXT_FIELD_TYPES} {$DEFINE RX_USE_DELPHI_EXT_FIELD_TYPES}
{$ENDIF} {$ENDIF}
{.$DEFINE RDBGridDisplayMemoText_ClearSC} //clear speshial chars on display memo text fields

View File

@ -4215,7 +4215,7 @@ end;
function TRxDBGrid.GetFieldDisplayText(AField: TField; ACollumn: TRxColumn function TRxDBGrid.GetFieldDisplayText(AField: TField; ACollumn: TRxColumn
): string; ): string;
var var
J: Integer; J, i: Integer;
begin begin
Result:=''; Result:='';
if Assigned(AField) then if Assigned(AField) then
@ -4224,7 +4224,14 @@ begin
begin begin
{$IF lcl_fullversion >= 1090000} {$IF lcl_fullversion >= 1090000}
if CheckDisplayMemo(AField) then if CheckDisplayMemo(AField) then
Result := AField.AsString begin
Result := AField.AsString;
{$IFDEF RDBGridDisplayMemoText_ClearSC}
for i:=1 to Length(Result) do
if Result[i] < ' ' then
Result[i]:=' ';
{$ENDIF}
end
else else
{$ENDIF} {$ENDIF}
Result := AField.DisplayText; Result := AField.DisplayText;