Listview 的难题(200分)

  • 主题发起人 主题发起人 xnonline2002
  • 开始时间 开始时间
X

xnonline2002

Unregistered / Unconfirmed
GUEST, unregistred user!
在listview 中有3项

A AA AAA
B BB BBB
C CC CCC


如何不用 Listview.items.clear 清空内容
再 用.add加入 项目的方法


而通过程序动态随意改写BBB为 'DDD' 或者其他内容
最好给个例子 nnn2000@163.com
 
你说的只要
ListView.items[1].subitems[2] := 'DDD'就可以了阿?
 
ListView1.Items[1].SubItems.strings[2]:='ghdgfsgha';
 
property SubItems: TStrings;

Description

Use SubItems to add strings that appear in the additional columns to the right of the list view
item when the list view抯 ViewStyle property is vsReport. The TStrings object that implements the
SubItems property is created when the list item is created. To the methods of the SubItems object to
add or delete subitems.

[8D]Note: Subitems are only visible when the list view's ViewStyle property is set to vsReport. [:D]
这是delphi5帮助的原话

Note: Subitems are only visible when the list view's ViewStyle property is set to vsReport
这一句 是什么意思 ListView.items[1].subitems[2] 是个只读属性
 
楼上说的对呀
这那是什么难题?
 
你的E文有问题
 
不好意思
 
接受答案了.
 
后退
顶部