djadja
asked on
inheriting from a TListview and creating coluimns in the OnCreate
I have inherited a new component 'TLogView' from the TListView. I have setup various 'extras' in the OnCreate and I need to create some columns. I tried to do this in the OnCreate and I get Control "" has no parent window when I try to add the component to a form. I tried to override the Loaded method (as according to the help this is where you would do any additional initialization after all properties have been streamed in) like so:
procedure TLogView.Loaded;
begin
inherited Loaded;
CreateMyCols;
end;
but creating a TLogView in the OnCreate of the form and even after setting the Parent, it does not call Loaded!
Can anyone help
procedure TLogView.Loaded;
begin
inherited Loaded;
CreateMyCols;
end;
but creating a TLogView in the OnCreate of the form and even after setting the Parent, it does not call Loaded!
Can anyone help
ASKER
This seems to have worked - thanks - but is this the usual way of doing stuff that you can't (or don't want to) do in the OnCreate?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I also program for a living! - Thanks again.
Ciao, Mike