如何制作一个转到下一张图像的按钮 [英] How do I make a button that goes to the next image
本文介绍了如何制作一个转到下一张图像的按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何制作一个转到下一张图片的按钮,就像点击>时的Windows照片一样它接下来。当你按<它是前一个图像的图标。在这个图像https://snag.gy/9HT1Uj.jpg它显示当我按>时我正在寻找什么我在图像上盘旋,它转到我选择的目录中的下一个图像
我尝试了什么:
我找不到任何可以做我想做的事情
how do i make a button that goes to the next image just like what windows photos does when you click > it goes next. when you press < icon it goes the the previous image. on this image https://snag.gy/9HT1Uj.jpg it shows what im looking for when i press the > that i circled on the image it goes to the next image that is in the directory that ive selected
What I have tried:
I couldnt find any info that did what i wanted to do
推荐答案
1)提示用户的文件夹/文件名(解析文件夹名称)
2)加载所选文件夹中的文件列表(* .jpg; * bmp;等)
3)从第一个加载第一个图像文件名
4)下一篇:当前图像文件名索引+ 1;加载相应的图像。
1) Prompt user for folder / file name (parse file folder name)
2) Load list of files from selected folder (*.jpg; *bmp; etc)
3) Load first image from first file name
4) Next: index of current image file name + 1; load corresponding image.
这篇关于如何制作一个转到下一张图像的按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文