Not quite true, also for a "most" of the property changes, Borland also
posts a CM_ message which you can catch to check for changes in properties.

Yes you can write to any protected property just by redeclaring - that's
what you do all the time - private however is another matter.

> -----Original Message-----
> From: Aaron Scott-Boddendijk [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, 14 October 1999 09:01
> To:   Multiple recipients of list delphi
> Subject:      Re: [DUG]:  Changing control style
> 
> >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
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to