J
JohnsonGuo
Unregistered / Unconfirmed
GUEST, unregistred user!
请看以下代码:
type
TMyNode = class(TTreeNode)
public
procedure MoveTo(Destination: TTreeNode; Mode: TNodeAttachMode); override;
end;
...
procedure TMyNode.MoveTo(Destination: TTreeNode; Mode: TNodeAttachMode);
begin
inherited;
ShowMessage('永远都不会出现的对话框!');
end;
...
procedure TForm1.Button1Click(Sender: TObject);
var
Node: TMyNode;
begin
Node := TMyNode(TreeView1.Selected);
Node.MoveTo(TreeView1.Items[0], naAddChild);
end;
运行该程序,会发觉不会出现对话框!!!!
请高手指教,如何才能把TTreeNode.MoveTo方法覆盖掉????
注:到现在为止,我就只发现这个方法不能被覆盖,如果各路英雄有发现其他类也有类似
情况的话,敬请提出。
type
TMyNode = class(TTreeNode)
public
procedure MoveTo(Destination: TTreeNode; Mode: TNodeAttachMode); override;
end;
...
procedure TMyNode.MoveTo(Destination: TTreeNode; Mode: TNodeAttachMode);
begin
inherited;
ShowMessage('永远都不会出现的对话框!');
end;
...
procedure TForm1.Button1Click(Sender: TObject);
var
Node: TMyNode;
begin
Node := TMyNode(TreeView1.Selected);
Node.MoveTo(TreeView1.Items[0], naAddChild);
end;
运行该程序,会发觉不会出现对话框!!!!
请高手指教,如何才能把TTreeNode.MoveTo方法覆盖掉????
注:到现在为止,我就只发现这个方法不能被覆盖,如果各路英雄有发现其他类也有类似
情况的话,敬请提出。