如题,注意ListView1.Enabled要一直为True。
解决方案 »
- !!!寻求ERP开发兼职人员(delphi 7 + cxGrid + Sql Server)!!!
- 请问如何让窗体显示在屏幕的所有应用程序的最外层???
- 比较难得问题!数据t1,与下表中字段t_doll中的值比较,如果t1介于a(i)与a(i+1)之间,就取t2=b(i);在线ing,给粉ing!
- 非技术生到了5个裤衩,不易啊,散分!
- 开工就遇到问题,帮帮忙!!
- 谁能解决这个问题我叫他老大
- 哪里有delphi+sqlserver2000的数据库连接例子
- 菜鸟怎样变高手?
- 还是刚才那个关于TADOTable问题,但是略有不同.
- 急急急、快进来看看!!!
- 关于正玄函数的小问题(很简单的)在线等
- Query中的模糊查询?
Change: TItemChange);
var
i: integer;
begin
for i:=0 to ListView1.Items.Count - 1do
if ListView1.Items[i].Checked then
ListView1.Items[i].Checked := False;
end;
可以考虑屏蔽掉鼠标左键按下的消息。
unit Unit1;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ComCtrls, StdCtrls, ShellAPI;type
TForm1 = class(TForm)
ListView1: TListView;
Button1: TButton;
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
LVWndProc :TWndMethod;
procedure NewWindowProc(var msg :Tmessage); end;var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
begin
ListView1.Items.Item[0].Checked := True;
end;procedure TForm1.FormCreate(Sender: TObject);
begin
LVWndProc := ListView1.WindowProc;
ListView1.WindowProc := NewWindowProc;
end;procedure TForm1.NewWindowProc(var msg: Tmessage);
var
i :Integer;
begin
if msg.Msg = WM_LBUTTONUP then
begin
for i:=0 to ListView1.Items.Count - 1do
if ListView1.Items[i].Checked then
ListView1.Items[i].Checked := False;
end;
if Assigned(LVWndProc) then LVWndProc(msg);
end;end.
-----------------------------------------------------------------
期待高手回复
去大富翁看看了