Canvas not Updating

Blitz3D Forums/Blitz3D Beginners Area/Canvas not Updating

I'm new to B+ and am having dificulties with my program flow, after adding a toolbar lifted straight from the B+ tutorials my program will only update when the mouse is being moved.

The code below loads information from a CSV file and displays each line as it is processed. Currently it will only read through the lines when the mouse is moving.

window=CreateWindow("CSV Cleaner",0,0,800,600)
canvas=CreateCanvas(0,0,800,600,window)
SetBuffer CanvasBuffer(canvas)

; create the menu

menu=WindowMenu(window)
file=CreateMenu("File",0,menu)
CreateMenu "Load",FILELOAD,file
CreateMenu "Save",FILESAVE,file
CreateMenu "Quit",FILEQUIT,file
help=CreateMenu("Help",0,menu)
CreateMenu "About",HELPABOUT,help

UpdateWindowMenu window

While Not Eof(CSVin)
	Cls
	DrawImage BGMain,0,0
	CSVLineNum = CSVLineNum + 1
	CSVLine$ = ReadLine(CSVin)
	NumCSVItems = CountItems( CSVLine$, "," )
	For A = 0 To NumCSVItems - 1
   	        item$ = Parse( CSVLine$, A, "," )
	        If Item$ = "" Then EmptyItems = EmptyItems + 1
	        CSVDataArray$(CSVLineNum,A) = item$
	Next
	textimage("Reading CSV",15,40)
	textimage(CSVLine$,15,65)
        UpdateToolbar()
        FlipCanvas canvas
wend


This piece of code shows the UpdateToolbar function called before the FlipCanvas command in the piece of code above.

Function UpdateToolbar()

Select WaitEvent()
	
Case $1001	;menu event
	Select EventData()

	Case FILELOAD:
	filename=RequestFile("Load File","*.*")

	Case FILESAVE:
	filename=RequestFile("Save File",filename,True)

	Case FILEQUIT:
	End

	Case HELPABOUT
	Notify "selecting About = user interest"
End Select		
	
Case $803	;close window event
End

End Select

End Function


Also whenever load or save is called up the canvas will go black.

TIA