Autor Beitrag
eniac
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 75

Win 98, Win XP, SuSE Linux 9.0
D3 Prof
BeitragVerfasst: Fr 22.10.04 12:41 
moin,


meine Frage kurz und schmerzlos:

Wie kann ich den Inhalt einer Canvas (z.B. von Image) löschen???

Danke für Tipps im Vorraus...
Luzzifus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 200

Win2K
D6 Prof
BeitragVerfasst: Fr 22.10.04 12:47 
hm nicht direkt glaube ich, du könntest aber einfach ein weißes Rechteck aufs Canvas malen (oder welche Hintergrundfarbe auch immer du möchtest):

ausblenden Delphi-Quelltext
1:
2:
3:
    Canvas.Brush.Color := clWhite;
    Canvas.Brush.Style := bsSolid;
    Canvas.FillRect(ClientRect);
eniac Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 75

Win 98, Win XP, SuSE Linux 9.0
D3 Prof
BeitragVerfasst: Fr 22.10.04 12:53 
joa, sowas in der Art hatte ich mir auch schon mal überlegt.

danke für den Rat; ich werds mal so machen!
DelphiFreund
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 120

Win XP
D7 Enterprise
BeitragVerfasst: Fr 22.10.04 18:16 
Ginge nicht auch für ein CanvasObject auf der Form einfach Repaint?


Gruß DelphiFreund

_________________
Irren ist menschlich...
Luzzifus
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 200

Win2K
D6 Prof
BeitragVerfasst: Fr 22.10.04 18:18 
Ich gehe mal davon aus das mit OnPaint(); gezeichnet wird, also irgendwelche Inhalte aufs Canvas gebracht werden.

Und Repaint macht ja nix anderes als das OnPaint-Ereignis auszulösen. :wink:
Monty Brown
Hält's aus hier
Beiträge: 4

Win XP home
D3 Prof
BeitragVerfasst: So 23.01.05 17:44 
Man kann Canvas auch einfach refreshen mit Canvas.refresh ... ist mir jetzt so spontan eingefallen :!: hihi :lol:
Greetz Monty