工程需要,要修改listview中每列字体的字符集,但是只找到了如何修改整个listview 字体字符集的方法,不知道怎样才能修改到列?
请大家指教!
多谢!

解决方案 »

  1.   

    要在中写
    procedure TForm1.ListView1DrawItem(Sender: TCustomListView;
      Item: TListItem; Rect: TRect; State: TOwnerDrawState);
    beginend;
      

  2.   

    没有测试,你可以试一试的。
    var
      vItem : TListItem
      vFontDialog : TFontDialog;
    begin
      vItem := ListView1.Items.Add;
      vFontDialog := TFontDialog.Create(Nil);
      vItem.Font := vFontDialog.Font;
      vItem.SubItem....
    end;----------------------------------------------------------
    事太多、心太乱
        
      

  3.   

    to  huojiehai(海天子):
      要怎么写啊?多谢!
      

  4.   

    to ihihonline(小小):
      vItem.Font := vFontDialog.Font;
      报错,vItem没有font属性。
      

  5.   

    procedure TOperatorPurviewFrm.PLLVCustomDrawSubItem(
      Sender: TCustomListView; Item: TListItem; SubItem: Integer;
      State: TCustomDrawState; var DefaultDraw: Boolean);
    begin
      Sender.Canvas.Font. .......end;