>I think you could typecast to a TEdit ALL the controls.
>I'm quite sure the propertiy is in the same place in all the controls

If color is a property of TControl but is protected then it's position in the class
signature should be defined and consistent.  As such you most likely can just
cast to TEdit for all controls.  However this then means that you would be using the
write specifier of the TEdit class which may be different for each class (you can
reintroduce new specifiers can't you) and the TEdit Color property write specifier 
may not be valid for all TControl descendants...

Strictly speaking there is NO safe way to generically write to a protected or private
property that may not become invalid in subsequent delphi updates -- It's what those
specifiers are for... Blame Borland for lack for foresight perhaps -- but noone is ever
going to produce the perfect baseclass for all possible futures...

--
Aaron Scott-Boddendijk
Jump Productions
(07) 838-3371 Voice
(07) 838-3372 Fax


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to