:Delphi,isapi,中的TPageProducer类继承(100分)

1

120

Unregistered / Unconfirmed
GUEST, unregistred user!
我想动态创建TPageProducer,OnHTMLTag事件如何写和调用?谢谢
再加100分
以前我写了一个动态创建TMenuItem的程序,如下:
var i:integer;
begin
for i:=0 to 3do
begin
subitem:=TMenuItem.create(self);
subitem.caption:='sdfgdfg';
subitem.onclick:=mypopup;
mainmenu.item[0]:=add(subitem);
end;
end;

procedure mypopup(sender:TObject);
begin
with sender as TMenuItemdo
begin
showmesssge(caption);
end;
end;

 
我现在出去办事,可能要晚上回来,如果您感兴趣可以先聊着
 
TPageHTML = class (TObject)
public
constructor Create() ;
overload;
destructor Destroy() ;
override;
procedure PageProducerOutputHTMLTag(Sender: TObject;
Tag: TTag;
const TagString: String;
TagParams: TStrings;
var ReplaceText: String);
end;


constructor TPageHTML.Create;
begin
inherited Create;
end;

destructor TPageHTML.Destroy;
begin
inherited Destroy;
end;

procedure TPageHTML.PageProducerOutputHTMLTag(Sender: TObject;
Tag: TTag;
const TagString: String;
TagParams: TStrings;
var ReplaceText: String);
begin
case Tag of
tgCustom:
begin
if TagString = 'TitleInfo' then
ReplaceText:='hello' ;
if TagString = 'Status' then
ReplaceText:= 'boby';
if TagString = 'Messages' then
ReplaceText:= 'sess';
end;
end;
end;
 
接受答案了.
 

Similar threads

I
回复
0
查看
613
import
I
S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
顶部