Japp der gesamte Code des Creates ist hier:
Delphi-Quellcode:
var new_sheet:TTabSheet;
new_listview:TListview;
new_button:TButton;
begin
new_Sheet := TTabSheet.Create(PageControl1);
new_Sheet.Caption := inputbox('Neue Liste','Bitte Namen für die Liste eingeben','Neue Liste');
new_Sheet.PageControl := PageControl1;
new_listview := TListview.Create(new_Sheet);
new_listview.Name := 'listview'+inttostr(pagecontrol1.PageCount);
showmessage(new_listview.Name);
new_listview.Parent := new_Sheet;
new_listview.ViewStyle := vsreport;
//new_listview.OnSelectItem := ListView1SelectItem;
//new_listview.OnColumnClick := ListView1ColumnClick;
//new_Listview.OnCompare := ListView1Compare;
//new_listview.OnCustomDrawItem := ListView1CustomDrawItem;
new_listview.columns := listview1.columns;
new_listview.Width := listview1.Width;
new_listview.Height := listview1.Height-30;
new_listview.Anchors := [akbottom, aktop, akleft, akright];
new_listview.GridLines := true;