LCL: grids: support string editor alignment

git-svn-id: trunk@50874 -
This commit is contained in:
ondrej 2015-12-17 19:20:16 +00:00
parent fe12761cd7
commit 66ddbe063a
3 changed files with 9 additions and 2 deletions

View File

@ -6622,6 +6622,13 @@ begin
EditorSetValue;
if ParentChanged then
Editor.Parent:=Self;
if FEditor=FStringEditor then
begin
if FCol<Columns.Count then
FStringEditor.Alignment:=Columns[FCol].Alignment
else
FStringEditor.Alignment:=taLeftJustify;
end;
Editor.Visible:=True;
if Focused and Editor.CanFocus then
Editor.SetFocus;

View File

@ -53,7 +53,7 @@ var
begin
Result:=ACellRect;
Inc(Result.Left);
Dec(Result.Right);
Dec(Result.Right, 2);
Dec(Result.Bottom);
TextHeight := ACanvas.TextHeight(' ');
case AColumnLayout of

View File

@ -49,7 +49,7 @@ var
TextHeight: Integer;
begin
Result:=ACellRect;
Dec(Result.Right);
Inc(Result.Right);
Dec(Result.Bottom);
TextHeight := ACanvas.TextHeight(' ');
case AColumnLayout of