unigui多页签UI框架

 

procedure TMainForm.openForm(Caption, FormClassName: string);
var
i: integer;
sheet: TUniTabSheet;
begin
for i := 0 to page.PageCount - 1 do
begin
if page.Pages[i].Caption = Caption then
begin
page.ActivePageIndex := i;
exit;
end;
end;
sheet := TUniTabSheet.Create(Self);
sheet.Closable := True;
sheet.Caption := Caption;
sheet.PageControl := page;
FCurrentFrame := TUniFrameClass(FindClass(FormClassName)).Create(Self);
FCurrentFrame.Align := alClient;
FCurrentFrame.Parent := sheet;
page.ActivePage := sheet;
end;

posted @ 2014-07-02 11:53  delphi中间件  阅读(4383)  评论(0编辑  收藏  举报