Board index » delphi » FindComponent

FindComponent

Hi,

    I am looking for a way to use : TMaskEdit(FindComponent('myEdit')).text
to find a component that is in another form.  Is there any way I can do
this?  Thanks!

-----------------------------------------
David Labbe
"Work for a living, Play for a life"

 

Re:FindComponent


Quote
David Labbe wrote:

> Hi,

>     I am looking for a way to use : TMaskEdit(FindComponent('myEdit')).text
> to find a component that is in another form.  Is there any way I can do
> this?  Thanks!

> -----------------------------------------
> David Labbe
> "Work for a living, Play for a life"

As FindComponent is a method, just call it in the context of the other
form.

Form2.FindComponent....

Alex
--
*** http://www.bullterrier-in-not.de/massenmord.htm ***

Author of the free Chatsystem PINO! || Website: http://www.alcomp.net
Available at http://pino.cjb.net    || Chat   : pino.wox.org:8080

Re:FindComponent


Yes, you need to specify the forms name.

something like this.
form2.findcomponent('????');
just make sure that the other units are in your uses list of the unit you are
calling it from.

Quote
David Labbe wrote:
> Hi,

>     I am looking for a way to use : TMaskEdit(FindComponent('myEdit')).text
> to find a component that is in another form.  Is there any way I can do
> this?  Thanks!

> -----------------------------------------
> David Labbe
> "Work for a living, Play for a life"

Other Threads