Jump to content

TUniFrameClass in UniTabSheet


ravedadave

Recommended Posts

Hi,

I am currently evaulating UniGUI and very impressed so far.

I am using A UniTabsheet the same as the full example with a menu, when you click the menu item it loads the frame form via TUniFrameClass

This is great, but I need more than one occurence, for example launch multiple copies of that tab via other means.

The first one loads from the menu fine, but when I try to invoke another using this crude code:

 

var
Ts : TUniTabSheet;
FrC : TUniFrameClass;
Fr : TUniFrame;
FClassName: string;
begin
 Ts := TUniTabSheet.Create(Self);
 Ts.PageControl := UniPageControl1;
 Ts.Closable := True;
 //Ts.OnClose := TabSheetClose;
 //Ts.Tag := NativeInt(Nd);
 Ts.Caption := 'MOO';
 Ts.ImageIndex := 0;
 FClassName :='TUniVehicleMain';
 FrC := TUniFrameClass(FindClass('TUniVehicleMain'));
 Fr := FrC.Create(Self);

 Fr.Align := alClient;
 Fr.Parent := Ts;
 UniPageControl1.ActivePage := Ts;

I get a warning specify "UniVehicleMain" already exists.

I need to be able to create multiple tabs with the same "UniVehicleMan" Frame.

Please could someone advise as I need to confirm what I need to achieve so I can purchase.

Thanks,

Dave

 

Link to comment
Share on other sites

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.

×
×
  • Create New...