Board index » cppbuilder » Design-time info

Design-time info

Hi

Can anyone suggest how my component can get at its parent's properties at
design-time, so that it can (eg) automatically centre or scale its size ??

It seems that properties such as Parent are NULL at design-time, and methods
such as GetParentComponent and even form->FindComponent don't work.

Right-clicking on the component and bringing up the component editor allows
me to perform alignment tasks, so it should be possible.

Thanks,
Denville.

 

Re:Design-time info


Quote
"Denville Longhurst" <Denvi...@metco.co.uk> wrote in message

news:95f0u2$31l12@bornews.inprise.com...

Quote
> It seems that properties such as Parent are NULL at design-time, and
methods
> such as GetParentComponent and even form->FindComponent don't work.

I don't know why it would be doing that for you, because Parent is indeed
valid during design time.

Gambit

Re:Design-time info


Thanks.  I should have said that Parent appears to be NULL within the
constructor, since that is where I was trying to do the clever bit.

Cheers,
Denville.

Quote
Remy Lebeau wrote in message <95frf0$j...@bornews.inprise.com>...

>"Denville Longhurst" <Denvi...@metco.co.uk> wrote in message
>news:95f0u2$31l12@bornews.inprise.com...

>> It seems that properties such as Parent are NULL at design-time, and
>methods
>> such as GetParentComponent and even form->FindComponent don't work.

>I don't know why it would be doing that for you, because Parent is indeed
>valid during design time.

>Gambit

Other Threads