我是这样做的~unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ComCtrls, StdCtrls;type TForm1 = class(TForm) lv1: TListView; procedure FormCreate(Sender: TObject); procedure lv1CustomDrawSubItem(Sender: TCustomListView; Item: TListItem; SubItem: Integer; State: TCustomDrawState; var DefaultDraw: Boolean); procedure lv1CustomDrawItem(Sender: TCustomListView; Item: TListItem; State: TCustomDrawState; var DefaultDraw: Boolean); private { Private declarations } FLvColumnWidths: array of Integer; public { Public declarations } end;var Form1: TForm1;implementation{$R *.dfm}procedure TForm1.FormCreate(Sender: TObject);var lvItem: TListItem; s: string; I: integer;begin if lv1.Columns.Count > 0 then begin SetLength(FLvColumnWidths, lv1.Columns.Count); // 设置初始值 for I := 0 to High(FLvColumnWidths) do FLvColumnWidths := 10;// FillChar(FLvColumnWidths[0], SizeOf(Integer) * Length(FLvColumnWidths), 10); end; s := '咗左基'; for i := 0 to 5 do begin s := s + 'A'; lvItem := lv1.Items.Add; lvItem.Caption := s; lvItem.SubItems.Add(s); lvItem.SubItems.Add(s); lvItem.SubItems.Add(s); end;end;procedure TForm1.lv1CustomDrawSubItem(Sender: TCustomListView; Item: TListItem; SubItem: Integer; State: TCustomDrawState; var DefaultDraw: Boolean);var TmpStr: string; iTextWidth: Integer;begin with TListView(Sender) do begin TmpStr := Item.SubItems.Strings[SubItem -1]; iTextWidth := Canvas.TextWidth(TmpStr) + 15 + 15; if SubItem <= High(FLvColumnWidths) then if iTextWidth > FLvColumnWidths[SubItem] then begin FLvColumnWidths[SubItem] := iTextWidth; Columns[SubItem].Width := FLvColumnWidths[SubItem]; end; end;end;procedure TForm1.lv1CustomDrawItem(Sender: TCustomListView; Item: TListItem; State: TCustomDrawState; var DefaultDraw: Boolean);var TmpStr: string; iTextWidth: Integer;begin with TListView(Sender) do begin TmpStr := Item.Caption; iTextWidth := Canvas.TextWidth(TmpStr) + 15 + 15; if iTextWidth > FLvColumnWidths[0] then begin FLvColumnWidths[0] := iTextWidth; Columns[0].Width := FLvColumnWidths[0]; end; end;end;end.