Multi images repeater

repeater-widget

#1

How to import differents images in repeater ? like a gallery


#2

You will need an image widget in your repeater. Create a column in the repeater dataset to store the image references. In each row, in that column cell, right click the cell and choose Import Image. Then, in the repeater’s Item Loaded event, include a Set Image action to set the image to
[[Item.MyImage]] where “MyImage” is the name of your column. Here is the Axure documentation for this:

https://docs.axure.com/axure-rp/reference/repeaters/#images

Note that the images will be loaded into one image widget in your repeater, and the dimensions of that widget will not change automatically. So, if your image widget is 50x50 px and you load an image which is 400x300 px it will be shown distorted and shrunk to 50x50 px. if you have images of different sizes, you’ll need to set the size of the image widget for any image which is different than the default widget dimensions in the editor. So you’ll want an extra column or two to keep track of the image dimensions.

An alternate approach if you have a limited set of images is to create A dynamic panel with one state per image. Load an image normally in each state. If you keep the default “Fit to Content” setting for the dynamic panel as well as set the “Fit to Content in HTML” setting for the repeater, then it will handle varying image sizes. In your “MyImage” column you’d include the name of the dynamic panel state, and in the Item Loaded event set the dynamic panel state to [[Item.MyImage]].


Repeater Rows Selection to show different Widgets
closed #3

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.