skin444
asked on
Accessing components dynamically
Hiya,
Is there a way in D2 to access an existing component on a form given a string that contains the name of the component?
I'm not clear that something like:
var
cc: TPersistentClass ;
c: TComponent;
begin
cc := GetClass('Memo1');
c := TComponentClass(cc).Create (applicati on);
is appropriate because the Memo1 component was already created with the form create. Is there a simple way.
A code snippet would be much appreciated.
Thanks,
Bob Skinner
rskinner@ix.netcom.com
component := TComponentClass(
Is there a way in D2 to access an existing component on a form given a string that contains the name of the component?
I'm not clear that something like:
var
cc: TPersistentClass ;
c: TComponent;
begin
cc := GetClass('Memo1');
c := TComponentClass(cc).Create
is appropriate because the Memo1 component was already created with the form create. Is there a simple way.
A code snippet would be much appreciated.
Thanks,
Bob Skinner
rskinner@ix.netcom.com
component := TComponentClass(
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
BORLAND in the folder DEMO of DELPHI 1.2 (16bits)
The name of the .DPR is DYNAINST.DPR