Jump to content

Recommended Posts

Posted
Good Morning!

 

I have a problem and I'm unable to solve.

 

C'mon:

 

When I work with normal uniforms, it is very easy to change the caption of a label of a form from another. Example:

 

TuniForm2.btOkClick procedure (Sender: TObject);

begin

   uniForm1.uniLabel1.caption: = uniForm2.uniLabel2.Caption;

end;

 

What I'm unaable to do:

 

TuniForm2.btOkClick procedure (Sender: TObject);

begin

   uniFrame1.uniLabe1.caption: = uniForm2.uniLabel2.Caption;

end;

 


This code does not error.

(In debug) The text is sent to the label, but for some reason does not reach the destination:


 



TuniForm2.btOkClick procedure (Sender: TObject);

begin

   FCurrentFrame := TUniFrameClass(FindClass('TuniFrame1')).Create(self);


   TuniFrame1(FCurrentFrame).uniLabel1.caption := 'hello world');

   TuniFrame1(FCurrentFrame).uniLabel2.caption := 'by';

   FCurrentFrame.Destroy;

end;

 


 

I tried to follow some examples of demos, but unfortunately could not.

Can anyone help me do this?

 

Grateful.

(Translated by Google)

 

*****************************************************************

 


Bom dia!

Estou com um problema e eu não estou conseguindo resolver.

Vamos lá:

Quando eu trabalho com uniForms normais, é muito fácil alterar o caption de um label de um form através de outro. Exemplo:

 


TuniForm2.btOkClick procedure (Sender: TObject);

begin

   uniForm1.uniLabel1.caption: = uniForm2.uniLabel2.Caption;

end;


 

O que eu não estou conseguindo fazer:

 


TuniForm2.btOkClick procedure (Sender: TObject);

begin

   uniFrame1.uniLabe1.caption: = uniForm2.uniLabel2.Caption;

end;


 


Esse código, não dá erro.

(No debug) O texto é enviado ao Label, mas por algum motivo não chega ao destino:

 



TuniForm2.btOkClick procedure (Sender: TObject);

begin

   FCurrentFrame := TUniFrameClass(FindClass('TuniFrame1')).Create(self);


   TuniFrame1(FCurrentFrame).uniLabel1.caption := 'hello world');

   TuniFrame1(FCurrentFrame).uniLabel2.caption := 'by';

   FCurrentFrame.Destroy;

end;

 


 


Tentei seguir uns exemplos dos demos, mas infelizmente não consegui.

Alguém pode me ajudar a fazer isso?

 

Grato.

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