Autor Beitrag
SteheAufDerLeitung
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 104



BeitragVerfasst: Mi 13.06.07 14:24 
Mittlerweile habe ich herausbekommen, wie man aus einer TreeView in ein INI-File schreibt. Nun frag ich mich aber, wie man ein INI-File überschreiben kann? Denn wenn weniger Elemente als beim vorigen Mal geschrieben werden sollen, so streikt Delphi und lässt dies nicht zu. Wie geht das denn? Vielen Dank schonmal..
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mi 13.06.07 14:31 
Moin und :welcome: im Forum!

Du musst die entsprechende Section löschen mit: :idea: ;)

ausblenden Delphi-Quelltext
1:
IniFile.EraseSection('KillMe');					

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
SteheAufDerLeitung Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 104



BeitragVerfasst: Mi 13.06.07 14:34 
Titel: ein guter Anfang!! :-D
Danke, das klingt nicht schlecht! Aber was ist denn, wenn ich viele Sections habe - muss ich die dann alle einzeln löschen??
Narses
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Administrator
Beiträge: 10185
Erhaltene Danke: 1261

W11x64
TP3 .. D7pro .. D10.2CE
BeitragVerfasst: Mi 13.06.07 14:37 
Moin!

Du kannst auch das ganze INI-File löschen: DeleteFile();)

cu
Narses

_________________
There are 10 types of people - those who understand binary and those who don´t.
SteheAufDerLeitung Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 104



BeitragVerfasst: Mi 13.06.07 14:45 
Mein Problem war ein wirklich leichtes. Um das iniFile zu löschen reicht schon:

DeleteFile(IniFile.FileName);

"Danke" aus den Fingern eines Anfängers, der hofft, dass er so wenigstens effektiv lernt ;-)