function TSTANDARDSTYLEMAINFORM.AddTab(AContainer: TFuncContainer): Integer;
var
Btn: TTabButton;
begin
exit;//添加的
Btn := TTabButton.Create(Self, cnrHeader, AContainer, FrameButtonResource);
Btn.Top := btnTabEnd.Top;
Btn.Left := btnTabEnd.Left;
Btn.Height := btnTabEnd.Height;
Btn.OnClick := TabClick;
Btn.PopupMenu := pmtbcWindows;
Result := FTabButtons.Add(Btn);
AdjustTabsVisible;
end;
procedure TSTANDARDSTYLEMAINFORM.RemoveTab(AContainer: TFuncContainer);
var
Next: TFuncContainer;
begin
exit;//添加的
FTabButtons.Remove(FindTabButton(AContainer));
FFuncContainerActiveStack.Remove(AContainer);
if FCurrentFuncContainer <> AContainer then
begin
AdjustTabsVisible;
Exit;
end;
FCurrentFuncContainer := nil;
if FFuncContainerActiveStack.Count = 0 then
if FTabButtons.Count = 0 then
Next := nil
else
Next := (FTabButtons[0] as TTabButton).FuncContainer
else
Next := FFuncContainerActiveStack.Last as TFuncContainer;