mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 12:49:21 +02:00
LCL: grids: support string editor alignment
git-svn-id: trunk@50874 -
This commit is contained in:
parent
fe12761cd7
commit
66ddbe063a
@ -6622,6 +6622,13 @@ begin
|
|||||||
EditorSetValue;
|
EditorSetValue;
|
||||||
if ParentChanged then
|
if ParentChanged then
|
||||||
Editor.Parent:=Self;
|
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;
|
Editor.Visible:=True;
|
||||||
if Focused and Editor.CanFocus then
|
if Focused and Editor.CanFocus then
|
||||||
Editor.SetFocus;
|
Editor.SetFocus;
|
||||||
|
@ -53,7 +53,7 @@ var
|
|||||||
begin
|
begin
|
||||||
Result:=ACellRect;
|
Result:=ACellRect;
|
||||||
Inc(Result.Left);
|
Inc(Result.Left);
|
||||||
Dec(Result.Right);
|
Dec(Result.Right, 2);
|
||||||
Dec(Result.Bottom);
|
Dec(Result.Bottom);
|
||||||
TextHeight := ACanvas.TextHeight(' ');
|
TextHeight := ACanvas.TextHeight(' ');
|
||||||
case AColumnLayout of
|
case AColumnLayout of
|
||||||
|
@ -49,7 +49,7 @@ var
|
|||||||
TextHeight: Integer;
|
TextHeight: Integer;
|
||||||
begin
|
begin
|
||||||
Result:=ACellRect;
|
Result:=ACellRect;
|
||||||
Dec(Result.Right);
|
Inc(Result.Right);
|
||||||
Dec(Result.Bottom);
|
Dec(Result.Bottom);
|
||||||
TextHeight := ACanvas.TextHeight(' ');
|
TextHeight := ACanvas.TextHeight(' ');
|
||||||
case AColumnLayout of
|
case AColumnLayout of
|
||||||
|
Loading…
Reference in New Issue
Block a user