设置:
procedure TMainForm.UniTreeMenu1Click(Sender: TObject);
var
Node:TUniTreeNode;
Ts: TUniTabSheet;
FrC: TUniFrameClass;
Fr: TUniFrame;
FClassName,ShowInfo:string;
begin
Node:= UniTreeMenu1.Selected;
if Node.Tag>1000 then
begin
Ts:=Node.Data;
if not Assigned(Ts) then
begin
try
FClassName:='TSub'+copy(IntToStr(Node.Tag),2,3);
Frc:=TUniFrameClass(FindClass(FClassName));
Ts:=TUniTabSheet.Create(Self);
Ts.PageControl:=UniPageControl1;
Ts.Closable:=True;
Ts.OnClose:=UniTabSheetClose;
Ts.Caption:=Node.Text;
Fr:=Frc.Create(Self);
dm.Auser.Fcode:=copy(Node.Text,1,3);
Fr.Align:=alClient;
Fr.Parent:=Ts;
Node.Data:=Ts;
Ts.Data:=Node;
except
ShowInfo:='无指定的模块:'+FClassName;
MessageDlg(ShowInfo, mtError, [mbOK],nil);
// UniSession.AddJS('Ext.get("messagebox-1001_header-title-textEl").setText("")');
Exit;
end;
end;
UniPageControl1.ActivePage := Ts;
end;
// end else begin
// if Node.Expanded = False then
// Node.Expanded := True
// else Node.Expanded := False;
// end;
end;