Build a Geography Flashcard App Part 2 - Add Images - Python Tkinter GUI Tutorial #53

preview_player
Показать описание
In this video we'll place our state images on the screen, and set up a randomization sequence that flashes a random state up onto the screen every time the program runs.

We'll start out by creating a python list of all our state names. Then we'll generate a random number in the range of the number of states we have. Next we'll use that random number to call a list item number from our list.

Finally we'll output the image itself on our app.

Easy!
Рекомендации по теме
Комментарии
Автор

Great video (all the serie) John, greetings from Habana, Cuba

alexamador
Автор

awesome video!! thanks a lot these are very helpful to us

hemalakshmi
Автор

what if all the images are not of the format png, how will we change the this code to add a jpeg mixed with png?

adityasagar
Автор

Instead of generating a random number within the function, I'd like to pass an index as an argument to the front() function... but that isn't working for me. To which function should I pass this index, i.e. which function is called to make this app run? Thanks so much - I love your videos!

themedicallinguist
Автор

A really cool idea is to use the os module to import images names listing files dynamicly also we can use it to get the names split the extensions with the .split() method but other than that realy cool idea tnx for the vid

akramelomrani
Автор

Hi John! Is it possible to have the state maps in png please so that the course can be done? Thank you !!!!

laurentreynaud
Автор

great tutorial about Tkinter John. Just a little question, I try this little code :
image_video =
lbl_imgvideo = Label(frame_app, image=image_video)
lbl_imgvideo.pack(padx=5, pady=5)
it's ok but when i try to put this code in a function the image don't appear !!!

jean-polbrasseur
Автор

Sir, I wanted to know where should we use destroy() or pack_forget(). As you use pack_forget() for removing the frame, I use destroy() in that place then I got an error. So, sir, I wanted to clarify it.

aastikmandil
Автор

Sir, is it legal to use images from google for my python projects. How can you download those images? They look pretty cool.

khaihoang
Автор

▶️ Watch Entire Tkinter Playlist ✅ Subscribe To My YouTube Channel:
▶️ See More At: ✅ Join My Facebook Group:

Codemycom
join shbcf.ru