Hi George
This is not a bug
IWFrameRegion.AjaxReRender();
has nothing to do with FancyBox.
Then why image count in collection on browser side increases when i press f5?
But If you're using cg version >= 1.8.0.3161
During research my report, or before?we detected today a bug with TIWCGComponents
I found memory leak in layout demo (on version 1.8.0.3188b 14.0.22, didn't test with new releases yet)i hope this one can be a version to published as stable
During research my report, or before?
I found memory leak in layout demo (on version 1.8.0.3188b 14.0.22, didn't test with new releases yet)
We're in fact releasing a new version, because of that
procedure TIWCGJQFrame1.IWCGJQButton1JQButtonOptionsClick(Sender: TObject; AParams: TStringList);
begin
LoadImageGallery(false);
IWCGJQFancyBox.AjaxReRender; // <-- rerender
IWCGJQFancyBox.JQFancyBoxOptions.Show();
end;
procedure TIWCGJQFrame1.IWCGJQButton2JQButtonOptionsClick(Sender: TObject; AParams: TStringList);
begin
LoadImageGallery(True);
IWCGJQFancyBox.AjaxReRender; // <-- rerender
IWCGJQFancyBox.JQFancyBoxOptions.Show();
end;
procedure TIWCGJQFrame1.LoadImageGallery(OnlyLast: boolean);
const
LFBImages: array [0 .. 2] of string = ('Hydrangeas.jpg', 'Lighthouse.jpg', 'Tulips.jpg');
LFBImagePath = '/imgs/';
var
I, MaxImg, StartIndex: Integer;
LItem: TIWCGJQFancyBoxImageGalleryItem;
begin
IWCGJQFancyBox.ImageGallery.Clear; // <--- clear collection
if OnlyLast then
begin
StartIndex := 2;
MaxImg := 2;
end
else
begin
StartIndex := 0;
MaxImg := 1;
end;
for I := StartIndex to MaxImg do
begin
LItem := IWCGJQFancyBox.ImageGallery.Add;
LItem.Picture.Url := LFBImagePath + LFBImages[I];
LItem.Alt := LFBImages[I];
end;
end;
procedure TIWCGJQFrame1.IWFrameRegionRender(Sender: TObject);
begin
IWCGJQFancyBox.ImageGallery.Clear;
end;