What if the number of empty frames cannot be pre-determined in advance? Based on your example, it only displays 1 sprite per "page" and the no. of sprite is pre-determined.
However, I would like to display more items (e.g. 6 column layout), and if there are more than 6 items, then it will display the navigation arrows for the user to scroll to view all the items. Otherwise, it will not have any arrows in the first place (or clicking the arrows will not have any effect).