Board index » delphi » setting a component's creation order automatically

setting a component's creation order automatically

I have a particular component that I always want to be first in its creation
order on the form.  In other words, when I drop it on the form, I want it to
automatically go to the top of the creation order list.  I know that I can
drop the component on and then go set its creation order manually, but I
want this to be done automatically.  Any thoughts on a simple way to do
this?

Thanks.

Daniel Boggs
CBN

 

Re:setting a component's creation order automatically


Quote
> I have a particular component that I always want to be first in its creation
> order on the form.  In other words, when I drop it on the form, I want it to
> automatically go to the top of the creation order list.  I know that I can
> drop the component on and then go set its creation order manually, but I
> want this to be done automatically.  Any thoughts on a simple way to do
> this?

Daniel,

in the components constructor, after the call to inherited create, assign 0
to the ComponentIndex property.

Peter Below (TeamB)  100113.1...@compuserve.com)
No e-mail responses, please, unless explicitely requested!

Other Threads