mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-11 15:48:34 +02:00
Patch from José Mejuto, fixes Listview column autosize
git-svn-id: trunk@26846 -
This commit is contained in:
parent
a8ea014bf6
commit
72d00b6953
@ -94,7 +94,11 @@ begin
|
||||
WSC.ColumnSetCaption(LV, Index, Self, FCaption);
|
||||
WSC.ColumnSetMaxWidth(LV, Index, Self, FMaxWidth);
|
||||
WSC.ColumnSetMinWidth(LV, Index, Self, FMinWidth);
|
||||
WSC.ColumnSetWidth(LV, Index, Self, FWidth);
|
||||
if FAutoSize then begin
|
||||
WSC.ColumnSetAutosize(LV, Index, Self, FAutosize);
|
||||
end else begin
|
||||
WSC.ColumnSetWidth(LV, Index, Self, FWidth);
|
||||
end;
|
||||
WSC.ColumnSetImage(LV, Index, Self, FImageIndex);
|
||||
WSC.ColumnSetVisible(LV, Index, Self, FVisible);
|
||||
end;
|
||||
|
@ -673,6 +673,9 @@ begin
|
||||
{$else}
|
||||
ListView_SetItemText(ALV.Handle, AIndex, ASubIndex, PChar(AText));
|
||||
{$endif}
|
||||
if ALV.Column[ASubIndex].AutoSize then begin
|
||||
ListView_SetColumnWidth(ALV.Handle, ASubIndex, LVSCW_AUTOSIZE);
|
||||
end;
|
||||
end;
|
||||
|
||||
class procedure TWin32WSCustomListView.ItemShow(const ALV: TCustomListView; const AIndex: Integer; const AItem: TListItem; const PartialOK: Boolean);
|
||||
|
Loading…
Reference in New Issue
Block a user