I am loading many images into a viewer, similar to the image carousel from the samples. I'd like to show a loading animation. I can't find any examples of that. I thought I saw that somewhere.
The image that shows while first opening a web page would be fine.
Best way to show/animate loading on VL-WEB
Best way to show/animate loading on VL-WEB
Art Tostaine
Re: Best way to show/animate loading on VL-WEB
Drop an image on you page and then use
Then you can show/hide your image as needed.
https://docs.lansa.com/14/en/lansa016/p ... gimage.htm
Code: Select all
evtroutine handling(#COM_OWNER.CreateInstance)
#LoadingImage.Image <= #SYS_WEB.LoadingImage
endroutine
https://docs.lansa.com/14/en/lansa016/p ... gimage.htm
Re: Best way to show/animate loading on VL-WEB
Thanks Joe. I did see how to define the image, how do you show it? I'm waiting for the easy answer I should have known.
art
art
Art Tostaine
Re: Best way to show/animate loading on VL-WEB
Set the visibility of your loading image.
Sometimes if your loading is really fast you may not see the image.
Code: Select all
evtroutine handling(#PTORequestDetailPanel.Loading)
#LoadingImage.Visible := True
#PTORequestDetailPanel.Visible := False
#ButtonPanel.Visible := False
endroutine
evtroutine handling(#PTORequestDetailPanel.Loaded)
#LoadingImage.Visible := False
#PTORequestDetailPanel.Visible := True
#ButtonPanel.Visible := True
endroutine
Re: Best way to show/animate loading on VL-WEB
Oh I see. You actually have an image control, I thought I had seen something in sys_web to set it to visible true.
Thanks
Thanks
Art Tostaine
Re: Best way to show/animate loading on VL-WEB
Right, you got to get an image control on the page, then set the reference to the SYS_WEB.LoadingImage to get the spinner gif. After that, then you can toggle the visibility of your loading image as required.
As far as I know, the SYS_WEB.LoadingImage is just there as a reference to get access to the gif. I think because you can't add a gif as a bitmap to the repo.
Joe
As far as I know, the SYS_WEB.LoadingImage is just there as a reference to get access to the gif. I think because you can't add a gif as a bitmap to the repo.
Joe
Re: Best way to show/animate loading on VL-WEB
If you place your gif files in webserver/Images directory then you can do:
#LoadingImage.Filename := 'http://anotherwebserver/Images/mygif.gif'
or:
#LoadingImage.Filename := '/Images/mygif.gif'
to set the image to a mygif.gif. In the first case, you can see that you could store the gif files on another webserver, but if they are on the same server you can omit the 'http://anotherwebserver' part of the filename.
yes, it doesnt use the repository, but it means you can use other gifs in your programs/rps.
#LoadingImage.Filename := 'http://anotherwebserver/Images/mygif.gif'
or:
#LoadingImage.Filename := '/Images/mygif.gif'
to set the image to a mygif.gif. In the first case, you can see that you could store the gif files on another webserver, but if they are on the same server you can omit the 'http://anotherwebserver' part of the filename.
yes, it doesnt use the repository, but it means you can use other gifs in your programs/rps.
-
dannyoorburg
- Posts: 177
- Joined: Mon Jan 04, 2016 9:50 am
- Location: Australia
Re: Best way to show/animate loading on VL-WEB
If you do want to use the Repository, register your gif as an External Resource in the Partition VL-Web folder
The External Resource is now just another LANSA object in your App and you can even refer to it in your code.
#Image.FileName := #MyExternalResource
Danny
The External Resource is now just another LANSA object in your App and you can even refer to it in your code.
#Image.FileName := #MyExternalResource
Danny
Re: Best way to show/animate loading on VL-WEB
Can you style this image? like adding a text under it, change the background color of the screen while it appears, etc.?