CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

TIWCGJQImage Changing the Image

by mait » 29 Nov 2016 01:01

I am using the TIWCGJQImage component to display a background image that generally remains static. This works well as the image is cached on the users computer. However, the user has the option to upload a different background image, which should then be used from that point onward for all users accessing the web page.

The component appears to cache one file for each picture type (e.g. bmp, jpg, etc.) and selecting any new image will simply display the cached image of the relevant type.

How do I tell the program/browser that a new image is to be displayed? I have called the Image.PictureChanged procedure but that doesn't appear to do anything. Neither does a full browser refresh.

delphi code
if FileExists(s) then
begin
Image.Picture.Picture.LoadFromFile(s);
Image.PictureChanged;
end;
mait
 
Posts: 10
Joined: 11 Feb 2015 10:12

by Alexander Bulei » 29 Nov 2016 11:00

Hi mait,

For this workflow,
I suggest you to define/change the Picture.CacheName everytime when you want display new image or activate Picture.UserCache.

Best Regards.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by mait » 30 Nov 2016 10:08

Thanks Alexander,

For my purposes changing Picture.CacheName is the solution.

Regards, Peter
mait
 
Posts: 10
Joined: 11 Feb 2015 10:12


Return to General

cron

Who is online

Users browsing this forum: No registered users and 37 guests

Contact Us.