Autor Beitrag
Leathl Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 276



BeitragVerfasst: Mi 15.01.03 14:54 
---


Zuletzt bearbeitet von Leathl am So 16.08.09 12:41, insgesamt 1-mal bearbeitet
Leathl Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 276



BeitragVerfasst: Do 16.01.03 13:06 
---


Zuletzt bearbeitet von Leathl am So 16.08.09 12:41, insgesamt 1-mal bearbeitet
DataCool
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 112



BeitragVerfasst: Do 16.01.03 23:31 
Hi,

im letzten posting hast Du eine Fehlermeldung bekommem, weil :

ausblenden volle Höhe Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
procedure TForm1.Button5Click(Sender: TObject);
var
  NewItem1: tListItem;
  i: Integer;
  j: Integer;
begin
  if OpenDialog1.Execute then
    OpenDialog1.DefaultExt := 'ini';
  ini := TIniFile.Create(OpenDialog1.FileName);
  try
    i          := ini.ReadInteger('Daten', 'Count', 0);
    Edit1.Text := ini.ReadString('Daten', 'Lehrer/in', '');
    Edit2.Text := ini.ReadString('Daten', 'LTel', '');
    Edit3.Text := ini.ReadString('Daten', 'Schule', '');
    Edit4.Text := ini.ReadString('Daten', 'Klasse/Stufe', '');
    Edit5.Text := ini.ReadString('Daten', 'Jahrgang', '');
    myListView.items.beginUpdate;
    myListView.items.clear;
    for j := 0 to i - 1 do
    begin
      // deshalb die Fehlermeldung, wohoer soll der Listview sonst auch wissen
      // das er ein neues Item hat. In manchen Fällen hilft auch Doku lesen ;-)
      NewItem1 := myListView.items.add;
      NewItem1.Caption := ini.ReadString(IntToStr(j), 'Sparte1', '');
      NewItem1.SubItems.Add(ini.ReadString(IntToStr(j), 'Sparte2', ''));
      NewItem1.SubItems.Add(ini.ReadString(IntToStr(j), 'Sparte3', ''));
      NewItem1.SubItems.Add(ini.ReadString(IntToStr(j), 'Sparte4', ''));
    end;
    myListView.items.EndUpdate;
  finally
    ini.Free;
  end;
end;


Außerdem ist es überflüssig die Eigenschaft Count in die Ini-Datei zu Schreiben. Denn wie Du in der Online-Doku nachlesen kannst gibt es die Methode .readSections

_________________
DataCool
Leathl Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 276



BeitragVerfasst: Fr 17.01.03 08:53 
---


Zuletzt bearbeitet von Leathl am So 16.08.09 12:41, insgesamt 1-mal bearbeitet
Leathl Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 276



BeitragVerfasst: Fr 17.01.03 09:05 
---


Zuletzt bearbeitet von Leathl am So 16.08.09 12:42, insgesamt 1-mal bearbeitet
Raphael O.
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 1596


VS 2013
BeitragVerfasst: Fr 17.01.03 09:25 
z.B. erst in ein memo oder richedit kopieren und dann drucken...

Fiji-Fighter
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Fr 17.01.03 09:32 
Leathl hat folgendes geschrieben:
so... jetzt bin ich beim problem mit dem drucken...

Neue Frage = neues Topic! Also bitte ein neues Topic erstellen!

Gruß
TINO