Hi there,
Having a vcl based on another control. Need to initialize some variables once. So put initialization into Create constructor.
The problem is that some properties (set at design time)
are not set yet within the constructor (even if the first line is 'inherited Create(AOwner);').
Here's some example,
1- TPageControl always have PageCount=0;
2- TStringGrid always have Options=[goFixedVertLine ..
goRangeSelect]
3- TTreeView always have Items.Count=0;
Is there any way to catch up, once in the life
of a visual component, the moment where all
properties are set as design time?
Someone in this forum already told me to override
procedure ReadState(Reader: TReader); but it
doesn't work: in ReadState proc the three case
above still true.
Thanks for reply,
Rej Cloutier
Having a vcl based on another control. Need to initialize some variables once. So put initialization into Create constructor.
The problem is that some properties (set at design time)
are not set yet within the constructor (even if the first line is 'inherited Create(AOwner);').
Here's some example,
1- TPageControl always have PageCount=0;
2- TStringGrid always have Options=[goFixedVertLine ..
goRangeSelect]
3- TTreeView always have Items.Count=0;
Is there any way to catch up, once in the life
of a visual component, the moment where all
properties are set as design time?
Someone in this forum already told me to override
procedure ReadState(Reader: TReader); but it
doesn't work: in ReadState proc the three case
above still true.
Thanks for reply,
Rej Cloutier