> Yes - I'm already using an interface to propagate changes to all controls
at
> design time. As yet I haven't figured out how to effectively to implement
> methods by delegation where those methods refer to private fields.
>
> Any examples would be a help.
>
One way of doing this is to have two interfaces. All of your components
implement IMyComponent which provides access to the protected component
details your new 'subobject' requires. Then when you create your subobject
you pass it the owning components IMyComponent interface (thereby allowing
your subobject to access all the information it requires from it's owning
component without know that the owning component actually is).
Unfortunately it's not brilliant. You will probably need to write some stub
procedures to implement IMyComponent on each of your components. I have done
this to expose SetVisible, SetEnabled and SetFocus (amongst others). I was
able to use the default implementations of SetEnabled and SetFocus but had
to write my own procedures for SetVisible (because it is declared as Private
in TControl) and others.
Hope this makes sense!
David Brennan.
DB Solutions Ltd.
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"