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:
parent
1b05a1ef23
commit
abb32988b1
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue