In this video we’ll use the FileChooser FileChooserIconView and FileChooserListView to create a simple image viewing app with Kivy.

Kivy makes creating a FileChooser incredibly easy, as we’ll see in this video! You basically have two different options; the FileChooserIconView gives you a directory structure with little icons for folders and files, whereas the FileChooserListView gives you a more traditional text list of file directories and files that you can navigate.

Either is easy to use and I’ll walk you through it in this video.

Python Code:
GitHub Code:

from import App
from kivy.uix.widget import Widget
from kivy.lang import Builder

# Designate Our .kv design file 

class MyLayout(Widget):
		def selected(self, filename):
				self.ids.my_image.source = filename[0]

class AwesomeApp(App):
	def build(self):
		return MyLayout()

if __name__ == '__main__':

Kivy Design Code: menu.kv
GitHub Code: menu.kv

	id: my_widget

		orientation: "vertical"
		size: root.width, root.height

		padding: 50
		spacing: 20

			id: my_image
			source: ""

			id: filechooser
			on_selection: my_widget.selected(filechooser.selection)

John Elder

John is the CEO of where he teaches over 100,000 students how to code! He founded one of the Internet's earliest advertising networks and sold it to a publicly company at the height of the first dot com boom. After that he developed the award-winning Submission-Spider search engine submission software that's been used by over 3 million individuals, businesses, and governments in over 42 countries. He's written several Amazon #1 best selling books on coding, and runs a popular Youtube coding channel.

View all posts

Add comment

Your email address will not be published. Required fields are marked *

John Elder