Y
ysp_1984
Unregistered / Unconfirmed
GUEST, unregistred user!
point是我已定义的一个全局变量,在TreeView的Mousedown事件中获取值。
procedure Tfrmmain.N47Click(Sender: TObject);
var
Node:Ttreenode;
str:string;
begin
node:=Treeview1.GetNodeAt(point.X,point.Y);
str:='是否要删除'+node.Text;
if Messagebox(0,pchar(str),'提示',MB_OKCANCEL)=idok then
Treeview1.Items.Delete(node);
end;
procedure Tfrmmain.N47Click(Sender: TObject);
var
Node:Ttreenode;
str:string;
begin
node:=Treeview1.GetNodeAt(point.X,point.Y);
str:='是否要删除'+node.Text;
if Messagebox(0,pchar(str),'提示',MB_OKCANCEL)=idok then
Treeview1.Items.Delete(node);
end;