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;

你可能感兴趣的:(GUI)