rencarnacion Posted October 22, 2013 Share Posted October 22, 2013 Hello, I'm having problem using frames in unigui form. the issue is when I create a frame I can't Insert o use in a form, does anybody have any idea what could be happening. Thanks Quote Link to comment Share on other sites More sharing options...
rasaliad Posted October 23, 2013 Share Posted October 23, 2013 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: LanzarVentana(Sender); I have these variable in private: FFrameTag : Integer; FFrameName : string; FCurrentFrame : TUniFrame; And the procedure: procedure TMainForm.lanzarVentana(Sender: TObject); begin if FFrameTag = TComponent(Sender).Tag then Exit; FFrameTag := TComponent(Sender).Tag; if Assigned(FCurrentFrame) then begin FreeAndNil(FCurrentFrame); end; FFrameOpcionName := ''; case FFrameTag of 0: begin FCurrentFrame := TUniFrameClass(FindClass('TfrEstudiantes')).Create(Self); FFrameName := 'Estudiantes'; end; end; if Assigned(FCurrentFrame) then begin FCurrentFrame.Align := alClient; FCurrentFrame.Parent := pnCentro; end; Caption := FFrameName; lbTitulo.Caption := FFrameName; end; Also the Mega Demo use frames, you can see there. I hope this help you. Regards Rafael Liriano 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.