Skip to main content
gamedev.net
🔒 Locked

refresh question

Started by Pillejunior Mar 9, 2004 at 3:24 AM 0 replies 300+ views
Original Post
Pillejunior
Pillejunior
I have a listview called ''paint'' and there i draw ellipses and rectangels on. When you minimize and then maximize the listview refreshes and everything drawn is gone. I fixed that with this code where lijst is a tlist with all objects drawn in it. So when the form refreshes it draws al the objects again. procedure TfrmHoofdscherm.FormPaint(Sender: TObject); var i : integer; begin for i := 0 to lijst.Count-1 do begin tFiguur(lijst.Items).tekenVierkant(paint.Canvas); end end; but know i want to clear the screen and i use lijst.clear to destroy all objects in the tlist but when i then call refresh in the code to come in the formpaint event it skips the for loop as it should but i still see the drawings? What am i doing wrong. Is it because of the listview i use to draw on(because with paintbox i can''t get to set the backcolor to white) or does the form not repaint the listview when you call refresh or...??? thanx in advance

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.