怎么给ListView的某一列添加可视化控件阿?

cissykiller 2003-06-12 12:27:00
那位有演示代码么?
...全文
48 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
jpyc 2003-06-15
  • 打赏
  • 举报
回复
能给listview的某一列添加checkbox或者ComboBox么?谢

checkbox可以,ComboBox没用过。可以提供例程,需要请发消息。
hkbarton 2003-06-14
  • 打赏
  • 举报
回复
上面的最后一句改为:
ListView.items.item[x].Data:=Button;
hkbarton 2003-06-14
  • 打赏
  • 举报
回复
可以的,一个例子:
//在第x个item上添加一个按纽
CRect:=ListView.items.item[x].DisplayRect(drbounds);
Button:=TButton.create(ListView);
with Button do
begin
parent:=ListView;
caption:='xxx';
top:=CRect.Top+1;
left:=CRect.Left+ListView.Columns[0].Width+300;
end;
ListView.items.item[x].Data:=CLabel;
lion_lh 2003-06-14
  • 打赏
  • 举报
回复
procedure TForm1.Button1Click(Sender: TObject);
var
r: TRect;
cb: TCombobox;
begin

Listview1.Columns.Add.Width := 100;
Listview1.Columns.Add.Width := 200;
Listview1.ViewStyle := vsReport;
Listview1.Items.Add.Caption := 'Text';
r := Listview1.Items[listview1.Items.Count-1].DisplayRect(drBounds);
r.Left := r.Left + Listview1.columns[0].Width;
r.Right := r.Left + Listview1.columns[1].Width;
cb := TCombobox.Create(Self);
cb.Height :=20;
cb.Parent := Listview1;
cb.BoundsRect := r;

end;
bcghb 2003-06-14
  • 打赏
  • 举报
回复
加一个ImageList,然后指明各个Item的ImageIndex不就可以了吗!
cissykiller 2003-06-12
  • 打赏
  • 举报
回复
能给listview的某一列添加checkbox或者ComboBox么?谢谢!
feng93017 2003-06-12
  • 打赏
  • 举报
回复
不明白你再说什么?

能不能把你的想法描述清楚一点。
蓝色光芒 2003-06-12
  • 打赏
  • 举报
回复
好象不能加,楼主是不是受其他语言的影响了。

5,388

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧