mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-24 19:50:28 +01:00
git-svn-id: trunk@54842 -
This commit is contained in:
parent
5fc40612bc
commit
2abbee1637
@ -1447,13 +1447,13 @@ end;
|
|||||||
function TCustomDBGrid.DefaultFieldColWidth(F: TField): Integer;
|
function TCustomDBGrid.DefaultFieldColWidth(F: TField): Integer;
|
||||||
begin
|
begin
|
||||||
if not HandleAllocated or (F=nil) then
|
if not HandleAllocated or (F=nil) then
|
||||||
result:=DefaultColWidth
|
result:=GetRealDefaultColWidth
|
||||||
else begin
|
else begin
|
||||||
if F.DisplayWidth = 0 then
|
if F.DisplayWidth = 0 then
|
||||||
if Canvas.HandleAllocated then
|
if Canvas.HandleAllocated then
|
||||||
result := Canvas.TextWidth( F.DisplayName ) + 3
|
result := Canvas.TextWidth( F.DisplayName ) + 3
|
||||||
else
|
else
|
||||||
Result := DefaultColWidth
|
Result := GetRealDefaultColWidth
|
||||||
else
|
else
|
||||||
result := F.DisplayWidth * CalcCanvasCharWidth(Canvas);
|
result := F.DisplayWidth * CalcCanvasCharWidth(Canvas);
|
||||||
end;
|
end;
|
||||||
@ -1610,7 +1610,7 @@ begin
|
|||||||
{$ifdef dbgDBGrid}
|
{$ifdef dbgDBGrid}
|
||||||
DebugLn('%s.GetBufferCount', [ClassName]);
|
DebugLn('%s.GetBufferCount', [ClassName]);
|
||||||
{$endif}
|
{$endif}
|
||||||
Result := ClientHeight div DefaultRowHeight;
|
Result := ClientHeight div GetRealDefaultRowHeight;
|
||||||
if dgTitles in Options then
|
if dgTitles in Options then
|
||||||
Dec(Result, 1);
|
Dec(Result, 1);
|
||||||
end;
|
end;
|
||||||
@ -4249,7 +4249,7 @@ begin
|
|||||||
FreeWorkingCanvas(tmpCanvas);
|
FreeWorkingCanvas(tmpCanvas);
|
||||||
|
|
||||||
end else
|
end else
|
||||||
result := DEFCOLWIDTH;
|
result := -1;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TColumn.CreateTitle: TGridColumnTitle;
|
function TColumn.CreateTitle: TGridColumnTitle;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user