delphi的ListView控件如何判断当勾选checkbox时,选的是第几行? 本帖最后由 wanghao0402 于 2012-07-26 15:08:13 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 procedure TForm1.lv1MouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);var item: TListItem;begin item := lv1.GetItemAt(X, Y); if item <> nil then begin ShowMessage(item.Caption); end;end; unit Unit3;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ComCtrls;type TForm3 = class(TForm) ListView1: TListView; Button1: TButton; procedure ListView1Changing(Sender: TObject; Item: TListItem; Change: TItemChange; var AllowChange: Boolean); private { Private declarations } public { Public declarations } end;var Form3: TForm3;implementation{$R *.dfm}procedure TForm3.ListView1Changing(Sender: TObject; Item: TListItem; Change: TItemChange; var AllowChange: Boolean);begin ShowMessage(IntToStr(Item.Index));end;end. 有办法在OnClick事件中实现获取行号吗? 有办法在OnClick事件中实现获取行号吗? fastreport 3.X 如何控制每页固定显示30行!如果超过30行自动转到下页 调用DB2存储过程,但却没有收到返回结果?在线结贴 怎样用ClientSocket和ServerSocket传输文件? ado.open以后的问题 如何判断数据集中有删除的记录? Synedit的专门讨论组,欢迎大家参加. 求SQL语句:有难度 没有比这更菜的问题了 关于tchart画实时曲线问题 求教使用TWebBrowser控件,得到网页里面表单元素的值,看了以前的帖子, 通过ComboBox改变字体。。。简单问题,过10分钟来结贴 delphi query 取字段名
Shift: TShiftState; X, Y: Integer);
var
item: TListItem;
begin
item := lv1.GetItemAt(X, Y);
if item <> nil then
begin
ShowMessage(item.Caption);
end;
end;
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ComCtrls;type
TForm3 = class(TForm)
ListView1: TListView;
Button1: TButton;
procedure ListView1Changing(Sender: TObject; Item: TListItem;
Change: TItemChange; var AllowChange: Boolean);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form3: TForm3;implementation{$R *.dfm}procedure TForm3.ListView1Changing(Sender: TObject; Item: TListItem;
Change: TItemChange; var AllowChange: Boolean);
begin
ShowMessage(IntToStr(Item.Index));
end;end.
有办法在OnClick事件中实现获取行号吗?