有关delphi动态建立页面的问题 其中这一段编译不通过,但是网上的例子都是这么写的,错误是open没定义
还有错误如下ifnot(OpenFileorNewFile)then//[Error]Unit1.pas(98):TypeofexpressionmustbeBOOLEA...
还有错误如下
if not(OpenFile or NewFile) then // [Error] Unit1.pas(98): Type of expression must be BOOLEAN
OpenFile:=true;//[Error] Unit1.pas(100): Not enough actual parameters
procedure TEditForm.Open1Click(Sender: TObject);
begin
if OpenDialog1.Execute then
begin
if not(OpenFile or NewFile) then
begin
OpenFile:=true;
Open(OpenDialog1.FileName);
Notebook1.Pages.Strings[0]:=ExtractFileName(OpenDialog1.FileName);
TabSet1.Tabs:=Notebook1.Pages;
end
else
begin
DynaPage.DynaAdd(Notebook1,ExtractFileName(OpenDialog1.FileName));
Open(OpenDialog1.FileName);
if Notebook1.Pages.Count>1 then
Close1.Enabled:=true;
end;
end;
end; 展开
if not(OpenFile or NewFile) then // [Error] Unit1.pas(98): Type of expression must be BOOLEAN
OpenFile:=true;//[Error] Unit1.pas(100): Not enough actual parameters
procedure TEditForm.Open1Click(Sender: TObject);
begin
if OpenDialog1.Execute then
begin
if not(OpenFile or NewFile) then
begin
OpenFile:=true;
Open(OpenDialog1.FileName);
Notebook1.Pages.Strings[0]:=ExtractFileName(OpenDialog1.FileName);
TabSet1.Tabs:=Notebook1.Pages;
end
else
begin
DynaPage.DynaAdd(Notebook1,ExtractFileName(OpenDialog1.FileName));
Open(OpenDialog1.FileName);
if Notebook1.Pages.Count>1 then
Close1.Enabled:=true;
end;
end;
end; 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询