diff --git a/lcl/valedit.pas b/lcl/valedit.pas index f378e74f6a..4bae0cf034 100644 --- a/lcl/valedit.pas +++ b/lcl/valedit.pas @@ -1076,14 +1076,17 @@ procedure TValueListEditor.AdjustColumnWidths; // If key column is fixed in width then adjust only the second column, // otherwise adjust both columns propertionally. var - CW, AWidth: Integer; + CW, AWidth, BWidth: Integer; begin CW := ClientWidth; if (doKeyColFixed in DisplayOptions) then begin //AutoSizeColumn(0); - If ColWidths[0] > CW Then - ColWidths[0] := CW - 1; + If ColWidths[0] > CW Then Begin + BWidth := CW - 1; + If BWidth > 0 Then + ColWidths[0] := BWidth; + end; AWidth := CW - ColWidths[0]; If AWidth > 0 Then ColWidths[1] := AWidth;