Autor Beitrag
delphinia
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 131

XP Pro Sp2
Delphi 5 Standard
BeitragVerfasst: Mo 20.02.06 22:46 
Hallo,

zur Laufzeit erstelle ich TImages.
Welche ich dann durch einen klick auf einen Button wieder löschen

und zwar so

ausblenden Delphi-Quelltext
1:
2:
  for o := 0 to all_icons do
    (FindComponent('t_i_' + IntToStr(o)) as TImage).Free;


Wenn ich dann danach aber wieder neue TImages anlege, erhalte ich Fehlermeldung siehe Anhang!

Aber ich sehe das die Images gelöscht werden... da sie nicht mehr auf der Form sind!
Versteh das jemand?!
Einloggen, um Attachments anzusehen!
afk
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 102

Win 2K, Win XP
Delphi 2006 Arch., Delphi 6 Ent., MS-SQL 2005 & 2000
BeitragVerfasst: Di 21.02.06 00:51 
Ich vermute mal, Du solltest die TImages nicht einfach nur mit TImage.Free löschen, sondern sie vorher mit TComponent.RemoveComponent(TImage) aus der Komponente entfernen, in die Du sie beim Erzeugen eingefügt hast.

Gruß Axel

_________________
Man muß sparn wo mn knn !