tlistview中如何显示多列?????(100分)

  • 主题发起人 王虎飞
  • 开始时间

王虎飞

Unregistered / Unconfirmed
GUEST, unregistred user!


如题。

一百分!!!!!
 
listview?

property Columns: TListColumns;
Use Columns to add or delete columns in the list view, or to edit
their display properties. When setting Columns at design time a
ListView Columns Editor dialog appears. This dialog allows columns to
be added or deleted, and the display properties of individual columns
to be changed. At runtime use the Caption, Alignment, and Width
properties of the TListColumn objects accessed by the Columns
property to change the appearance of the column headers.
To display the columns, set the ViewStyle property to vsReport and
the ShowColumnHeaders property to True.
 
doubleclick the listview then click 'add new' button.or change the
columns property.
 
我是指其第二列的内容如何显示?
as:

name type
_____________________________

1.bat file
2 dir
3.bat file

not headers.

谢谢各位大侠赐教!!!
 

后一列是前一列的subitem

也就是说你例子中 file是1.bat的subitem

在程序中写成
ListItem := Items.Add;
ListItem.Caption := '1.bat';
ListItem.SubItems.Add('file');

 
谢谢!!!!
 
I have met the problem recently,thanks
 
顶部