1
1
Fork 0
mirror of https://github.com/FellippeHeitor/InForm.git synced 2025-01-15 03:49:56 +00:00

Allows passing an empty file name to LoadImage to reset PictureBox canvas.

This commit is contained in:
FellippeHeitor 2018-06-11 20:13:10 -03:00
parent 1b05a1ef23
commit abb32988b1

View file

@ -4450,7 +4450,12 @@ SUB LoadImage (This AS __UI_ControlTYPE, File$)
IF This.HelperCanvas >= -1 THEN ErrorMessage$ = "Unable to load file:"
END IF
ELSE
ErrorMessage$ = "Missing image file:"
IF File$ = "" THEN
'Passing an empty file name can be used to clean the canvas
This.HelperCanvas = _NEWIMAGE(This.Width, This.Height, 32)
ELSE
ErrorMessage$ = "Missing image file:"
END IF
END IF
IF LEN(ErrorMessage$) THEN