mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-10-24 12:31:32 +02:00
ValEdit: fix crash in ValueListEditor.AdjustColumnWidths.
Patch by Cyrax. Issue #0024779. git-svn-id: trunk@42205 -
This commit is contained in:
parent
08b51de095
commit
24dd7801d7
@ -1076,13 +1076,17 @@ procedure TValueListEditor.AdjustColumnWidths;
|
|||||||
// If key column is fixed in width then adjust only the second column,
|
// If key column is fixed in width then adjust only the second column,
|
||||||
// otherwise adjust both columns propertionally.
|
// otherwise adjust both columns propertionally.
|
||||||
var
|
var
|
||||||
CW: Integer;
|
CW, AWidth: Integer;
|
||||||
begin
|
begin
|
||||||
CW := ClientWidth;
|
CW := ClientWidth;
|
||||||
if (doKeyColFixed in DisplayOptions) then
|
if (doKeyColFixed in DisplayOptions) then
|
||||||
begin
|
begin
|
||||||
//AutoSizeColumn(0);
|
//AutoSizeColumn(0);
|
||||||
ColWidths[1] := CW - ColWidths[0];
|
If ColWidths[0] > CW Then
|
||||||
|
ColWidths[0] := CW - 1;
|
||||||
|
AWidth := CW - ColWidths[0];
|
||||||
|
If AWidth > 0 Then
|
||||||
|
ColWidths[1] := AWidth;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user