A
arocw
Unregistered / Unconfirmed
GUEST, unregistred user!
TExStringGrid = class(TStringGrid)
private
fESGPopMenu: TPopupMenu; //想加一个PopupMenu
protected
public
end;
constructor TExStringGrid.Create(AOwner: TComponent);
begin
inherited ;
fESGPopMenu:=TPopupMenu.Create(self);
with fESGPopMenu.Items do
begin
Add(NewLine); // 增加一个分割棒
end;
PopupMenu:=fESGPopMenu;
end;
end;
destructor TEduStringGrid.Destroy;
begin
fESGPopMenu.Free;
inherited Destroy;
end;
我在TStringGrid中加入一个PopupMenu成为一个新的TExStringGrid.
把TExStringGrid拖到窗体上,会创建一个StringGrid和一个PopupMenu.
再拖就出错,不能创建.
并且运行时出错.
如果把PopupMenu删除,运行不出错,但再删除StringGrid时delphiIDE出错.
请问该怎么做啊
private
fESGPopMenu: TPopupMenu; //想加一个PopupMenu
protected
public
end;
constructor TExStringGrid.Create(AOwner: TComponent);
begin
inherited ;
fESGPopMenu:=TPopupMenu.Create(self);
with fESGPopMenu.Items do
begin
Add(NewLine); // 增加一个分割棒
end;
PopupMenu:=fESGPopMenu;
end;
end;
destructor TEduStringGrid.Destroy;
begin
fESGPopMenu.Free;
inherited Destroy;
end;
我在TStringGrid中加入一个PopupMenu成为一个新的TExStringGrid.
把TExStringGrid拖到窗体上,会创建一个StringGrid和一个PopupMenu.
再拖就出错,不能创建.
并且运行时出错.
如果把PopupMenu删除,运行不出错,但再删除StringGrid时delphiIDE出错.
请问该怎么做啊