本文整理自网络,侵删。
实现代码:
procedure TfrmMain.OpenForm(Caption,FormClassName:string);var i:integer; sheet:TUniTabSheet;begin for i := 0 to pgeMain.PageCount-1 do begin if pgeMain.Pages[i].Caption=Caption then begin pgeMain.ActivePageIndex:=i; exit; end; end;
sheet:=TUniTabSheet.Create(Self); sheet.Closable:=True; sheet.Caption:=Caption; sheet.PageIndex:=i+1; sheet.PageControl:=pgeMain;
FCurrentFrame:=TUniFrameClass(FindClass(FormClassName)).Create(Self);
FCurrentFrame.Align:=alClient; FCurrentFrame.Parent:=sheet; pgeMain.ActivePage:=sheet;
end;
相关阅读 >>
Delphi webbrowser ie 窗口选择中,选中的文字内容
Delphi fmx 获取系统版本 android ios通用
Delphi lastdelimiter:在字符串中查找选定的字符最后出现的位置
Delphi cxdbtreelist:最简单的节点图标添加方法
Delphi 禁止用键盘左右箭头,去切换pagecontrol页签
Delphi xe(indy10)tidbytes转ansistring的实现
Delphi idhttp中设置非标准头信息和读写cookie
更多相关阅读请进入《Delphi》频道 >>