PC SOFT

GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEVWEBDEV e WINDEV Mobile

Inicio → WINDEV 2024 → WB22 - Loading An Image Dynamically
WB22 - Loading An Image Dynamically
Iniciado por André Labuschagné, jul., 19 2018 4:01 PM - 4 respostas
Publicado em julho, 19 2018 - 4:01 PM
Hi All

How does one programmatically load an image into an image control on a WB page. I need the simplest of examples. Nothing that I have tried so far works.

Tried changing the value. Tried assigning from another existing image control that has an image loaded into it.

Cheers

André
Publicado em julho, 19 2018 - 4:20 PM
Hi André

MyImageControl=RelativeImagePath

if your image control is set as dynamic, and your image is in your _Web directory (or below) and you use the correct relative imagepath (different in classic and awp), then it's working fine

Of course, this is in server code.

Best regards
Publicado em julho, 19 2018 - 4:38 PM
Hi Fabrice

Thanks.

That was it - the correct extension was the issue.

Next question - how do I establish which row has been selected? I am trying to retrieve the value attribute contents of the image control. If I can retrieve that I may have a very neat solution.

Cheers

André
Publicado em julho, 19 2018 - 5:52 PM
Hi Fabrice

I can take the image from the looper to the image outside the looper but cannot get it back into the looper. Using the exact same syntax for relative path.

André
Publicado em julho, 19 2018 - 6:06 PM
Hi Fabrice

From looper to image outside of looper using browser code and back into the looper using server code. So far so good.

Now to battle with the image size not fitting in the size of the control after changing pixels.

:-(

André