listview控件 各位高手,当点击LISTVIEW控件左边的“检测盒”时,怎么样让当前选测的“检测盒”成为当前选中的行。 在线等待。谢谢大家了! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 当把LISTVIEW控件的checkboxes设为真的时候,当在LISTVIEW里增加一行时,在左边就一有一个“小盒子”可以选择的。如:当你把第三行的“小盒子”选择为真时listview1.items[2].checked :=true ,我要让listview1.items[2].selected也为真。现在关键是我点击“小盒子”的时候,不如道它是第几行。 Item : TListItem;procedure TForm1.ListView1Click(Sender: TObject);begin if Item <> nil then if Item.Checked then Item.Selected := True;end;procedure TForm1.ListView1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);begin Item := ListView1.GetItemAt(X,y);end; THREAD ERROR 句柄无效 6 的错误 有关导入数据问题. 如何判断外部程序编辑框的状态? FastReport设置TfrMemoView字符串的问题 listview中怎么得到选中的多行数据 如何判断鼠标是否在该控件? 见鬼了,我TMyStringGrid中创建一个TEdit对象出问题 请教大侠:学delphi要c语言或其他语言基础吗? 怎样使窗体在满足条件前,不能被任何一种方式关掉? help!!!!!!! CSDN 终于可以上啦 乐啊 !!!!!散分!!!! 不知道怎么给200分 我发两次贴 FLASH右键菜单怎么屏蔽?
listview1.items[2].checked :=true ,我要让listview1.items[2].selected也为真。现在关键是我点击“小盒子”的时候,不如道它是第几行。
procedure TForm1.ListView1Click(Sender: TObject);
begin
if Item <> nil then
if Item.Checked then Item.Selected := True;
end;procedure TForm1.ListView1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
begin
Item := ListView1.GetItemAt(X,y);
end;