mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 23:30:22 +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.ColumnSetCaption(LV, Index, Self, FCaption);
|
||||||
WSC.ColumnSetMaxWidth(LV, Index, Self, FMaxWidth);
|
WSC.ColumnSetMaxWidth(LV, Index, Self, FMaxWidth);
|
||||||
WSC.ColumnSetMinWidth(LV, Index, Self, FMinWidth);
|
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.ColumnSetImage(LV, Index, Self, FImageIndex);
|
||||||
WSC.ColumnSetVisible(LV, Index, Self, FVisible);
|
WSC.ColumnSetVisible(LV, Index, Self, FVisible);
|
||||||
end;
|
end;
|
||||||
|
@ -673,6 +673,9 @@ begin
|
|||||||
{$else}
|
{$else}
|
||||||
ListView_SetItemText(ALV.Handle, AIndex, ASubIndex, PChar(AText));
|
ListView_SetItemText(ALV.Handle, AIndex, ASubIndex, PChar(AText));
|
||||||
{$endif}
|
{$endif}
|
||||||
|
if ALV.Column[ASubIndex].AutoSize then begin
|
||||||
|
ListView_SetColumnWidth(ALV.Handle, ASubIndex, LVSCW_AUTOSIZE);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
class procedure TWin32WSCustomListView.ItemShow(const ALV: TCustomListView; const AIndex: Integer; const AItem: TListItem; const PartialOK: Boolean);
|
class procedure TWin32WSCustomListView.ItemShow(const ALV: TCustomListView; const AIndex: Integer; const AItem: TListItem; const PartialOK: Boolean);
|
||||||
|
Loading…
Reference in New Issue
Block a user