跟哪个一起使用啊?ListView还是listBox?
具体怎么使用?谢谢!
具体怎么使用?谢谢!
解决方案 »
- 关于系统模块化开发的二个疑问
- 为什么用delphi7的TImage控件无法显示用photoshop转换来的.jpg文件呢?
- 求网吧管理系统原码(最好是连锁网吧版)......价钱=? 加85835703
- RPC服务器不可用,可能是什么原因?
- 在com+中如何取得相关dll所在路径?
- RegularExpressions1.0 PATH路径设置问题
- 基本语句:选择.DB的
- InstallShield生成的安装程序有问题。快来帮忙,快来拿分!
- Stringgrid总是默认给第1行第1列加上深蓝色,能不能去掉,都是白色?
- 关于快速报表的问题!!!
- TShellListView怎么实现文件类型过滤?
- DLL问题,出错了。。
var
I: Integer;
ListItem: TListItem;
NewColumn: TListColumn;
begin
// Create a ListView item for each image in the ImageList
with ListView1 do
begin
SmallImages := ImageList1;
LargeImages := ImageList1;
for I := 0 to ImageList1.Count - 1 do
begin
ListItem := Items.Add;
Listitem.Caption := 'Image' + IntToStr(I); ListItem.ImageIndex := I;
end;
// Create two columns to show during viewing as vsReport
NewColumn := Columns.Add;
NewColumn.Caption := 'Column 1';
NewColumn := Columns.Add;
NewColumn.Caption := 'Column 2';
// Add View styles and constants to the Combo Box
ComboBox1.Items.AddObject('vsIcon', TObject(vsIcon));
ComboBox1.Items.AddObject('vsList', TObject(vsList));
ComboBox1.Items.AddObject('vsReport', TObject(vsReport)); ComboBox1.Items.AddObject('vsSmallIcon', TObject(vsSmallIcon));
// Display first item in the Combo Box
ComboBox1.ItemIndex := 0;
end;
end;procedure TForm1.ComboBox1Click(Sender: TObject);
begin
with ComboBox1 do
ListView1.ViewStyle := TViewStyle(Items.Objects[ItemIndex]);
end;
在这里headercontrol中加了两项内容:
// Create two columns to show during viewing as vsReport
NewColumn := Columns.Add;
NewColumn.Caption := 'Column 1';
NewColumn := Columns.Add;
NewColumn.Caption := 'Column 2';