Jump to content

Problem with the frames


Recommended Posts

Hi Ronny


When you say frames, you are talking about TUniFrame?


If so, this is the way I do it, and it work fine for me:


I Have a main form, in this form there is a UniPanel, then I have a procedure that I invoke to show my frames


For example on a Button click:





I have these variable in private:


    FFrameTag : Integer;
    FFrameName : string;
    FCurrentFrame : TUniFrame;



And the procedure:

procedure TMainForm.lanzarVentana(Sender: TObject);
  if FFrameTag = TComponent(Sender).Tag then Exit;

  FFrameTag := TComponent(Sender).Tag;

  if Assigned(FCurrentFrame) then begin
  FFrameOpcionName := '';

  case FFrameTag of
  0:  begin
        FCurrentFrame           := TUniFrameClass(FindClass('TfrEstudiantes')).Create(Self);
        FFrameName              := 'Estudiantes';

  if Assigned(FCurrentFrame) then begin
    FCurrentFrame.Align   := alClient;
    FCurrentFrame.Parent  := pnCentro;
  Caption           := FFrameName;
  lbTitulo.Caption  := FFrameName;

Also the Mega Demo use frames, you can see there.


I hope this help you.




Rafael Liriano

  • Like 1
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.

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...