PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → WD23: Image Control empty vs. filled
WD23: Image Control empty vs. filled
Iniciado por GuenterP, 24,jun. 2018 17:58 - 3 respuestas
Publicado el 24,junio 2018 - 17:58
Hi, this is maybe a simply-to-answer question:

How to find out whether an image control is empty (= no image shown) or contains an image? Images are coming from the clipboard but could have been emptied by a button with the codeline: MyImage = ""
Publicado el 24,junio 2018 - 19:45
Hey Guenter

Maybe you got test one of the image properties if there are filled?
Publicado el 25,junio 2018 - 01:00
Hi Guenter

If I remember correctly, testing image..width will give you zero only if empty.

Best regards From Nashville :-)
Publicado el 25,junio 2018 - 07:22
Hi Fabrice,
my congratulations!! :cheers:

Imho, the ..width property of an image control refers to the control itself, not to its content. MyImageControl..image..width is impossible anyway. I solved the problem by referring to the caption of MyImageControl. I'm starting with MyImageControl..Caption = "" and whenever it is filled from the Clipboard, I set it to "Image" and whenever the image is deleted, ..caption is set back to "". Not a really clean solution but viable.