Jump to content

Forms TDI - Tabs


NelsonFS
 Share

Recommended Posts

good +1.
 
but, why create new panel ?
 
 
  //if not found, then create it...
  TabSheetNew              := TUniTabSheet.Create(NavPage);
  TabSheetNew.PageControl  := NavPage;
  TabSheetNew.Caption      := Titulo;
  TabSheetNew.Name         := Name;
  TabSheetNew.Closable     := True;
  TabSheetNew.OnClose      := CheckTab;
 
//  PanelTabSheetNew := TUniPanel.Create(TabSheetNew);
//  PanelTabSheetNew.Align := alClient;
//  PanelTabSheetNew.Parent := TabSheetNew;
 
//  FCurrentFrameTab := TUniFrameClass(FindClass(Name)).Create(Self);
//  FCurrentFrameTab.Parent := PanelTabSheetNew;
//  FCurrentFrameTab.Align := alClient;
 
  FCurrentFrameTab := TUniFrameClass(FindClass(Name)).Create(Self);
  FCurrentFrameTab.Parent := TabSheetNew;
  FCurrentFrameTab.Align := alClient;

 

Link to comment
Share on other sites

  • 3 weeks later...

This panel is usefull case you need add a accordion panel left side, or reorganize frame and form, example, hide/show all frame. You wont need to put all frame components in other place.. was just thinking in future.. just this.

Link to comment
Share on other sites

  • 2 weeks later...
  • 10 months later...
I tried to use his example, but did not work when using a legacy tuniframe
 
-> TfrmBase = class (TUniFrame)
 
TfrmEscola = class (TfrmBase) - here and an inherited form of TFrmBase
 
 
InsertFrameTab ('TfrmEscola', 'school');
 
the access violation error that line
   FCurrentFrameTab: = TUniFrameClass (FindClass (Name)) Create (Self);.
 
 
 
initialization
   RegisterClasses ([
                    TfrmBase,
                    TfrmEscola
                   ]);
   RegisterAppFormClass (TFrmPrincipal);
 
-------------------------------------------------------------------------------------
 
in forms of TUniFrame type usually works

 

Link to comment
Share on other sites

  • 1 year later...
  • 8 months later...
  • 3 years later...
  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...