Главная страница | назад





Article #15523: When does the design-time property get set?

 Question and Answer Database

FAQ523C.txt   When does the design-time property get set?
Category   :VCL
Platform    :All
Product    :C++Builder  1.x

Question:

I have derived a component from a TPanel.  In the constructor,
I look at the BevelWidth property; it is always 1 regardless
of what the user sets it to at design time.  Apparently the
property is updated with the design time value after my
constructor fires. When does this happen?  Where is a good
place to trap this value during initialization of the
component?

Answer:

When components are read from a stream, each component is
first constructed, then its property values are read from
the stream.  A component's Loaded() method is called after
all streaming has finished. You can override Loaded() to do
something with the component immediately after its state
has been read from the stream.

7/2/98 10:32:32 AM
 

Last Modified: 01-SEP-99