Hi Peter,
the Owner parameter in the create constructor should be the component that
"owns" the created component. The ownership means, among others, that the
created component
is destroyed when the owner is destroyed. Because the components are usually
created within Form methods, the parameter is almost allways SELF, which
means
the instance of the form that called the method.
Generally - SELF is defined only within methods of CLASSes (or objects) and
represents
the instance of the class (object) that called the method.
Nothing in the world, however, can prevent you from setting the owner to
whatever
component you want: MyGrid := tStringGrid.Create(Application.mainform) for
example.
After creating the grid, don't forget to set its parent before setting all
other properties. The parent property should be the wincontrol on the top of
which the grid should actually
appear - some panel for example.
As to the question of copying data from one grid to another, I am afraid
that you will need to
iterate through cells, which is not much of code anyway.
--
Roman
KRE...@mbox.cesnet.cz(please remove STOPSPAM. in header]
Peter Montgomery wrote in message ...