Link to home
Start Free TrialLog in
Avatar of ntony
ntony

asked on

ListView

I what to create a component derived from TListView.
I need to create some Columns and set some properties like RowSelect and ViewStyle(vsReport).

The problem is that if i do this:

constructor TMyListView.Create(AOwner: TComponent);
begin
     inherited Create(AOwner);
     ViewStyle:=vsReport;
     RowSelect:=True;
     Columns.Add.Caption:='Name';
end;

,put a the component on a form and run the application =>
ERROR: Control has no parent windows.
Where is the problem?

PS: this is all the code (added)

Regards
NTony.
ASKER CERTIFIED SOLUTION
Avatar of Igor UL7AAjr
Igor UL7AAjr
Flag of Kazakhstan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial