Adding a Full Screen ScrollBar - Python Tkinter GUI Tutorial #96

preview_player
Показать описание
In this video I'll show you how to add a scrollbar that scrolls your entire tkinter app.

Normally scrollbars are used for listboxes, but what if you just wanted one to run the whole length of your app? Is it possible?

Well...sort of.

We can use a scrollbar on a canvas...and we can hack a canvas to hold a frame, and we can add all of our app stuff into that frame...and that's what I'll show you how to do in this video!
Рекомендации по теме
Комментарии
Автор

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

Codemycom
Автор

Your videos are amazing
Don't stop posting it
even though you don't have a lot views
There is people that appreciate your work.
Thank You

nataliogomes
Автор

Love the videos! You are always so happy and positive while teaching. Can’t thank you enough!

techcomparisons
Автор

Thanks!! It's sad your channel isn't that popular, you're the best youtube python teacher I've found

nowybopes
Автор

i dont know how i can say this, by you made me a code, now i write logical pogrames, but all i learnt this from you just for free, thank you

cyberbashir
Автор

I really appreciate all of the videos on using Tkinter. Really, I use it for different projects and love being able to come back to these videos

larsondavis
Автор

Damn. Two hours looking at stackoverflow questions couldn't do what 10 minutes watching your video did to help me make this work. Thanks!!!

ravedavedave
Автор

no one will ever know how much i appreciate this gentleman for all the knowledge he shared in this one youtube channel for a "reasonable" prices, and the vibes, i love it.

but now you know...

akmalhsa
Автор

SO HELPFUL thank you so much!! spent days looking for an explanation as to how this works and youve pretty much cleared it up for me.. i'll be back!!

hannahthompson
Автор

If you dont want to type copy this
class scrolbar:
def _on_mouse_wheel(self, event):
self.canvas.yview_scroll(-1 * int((event.delta / 120)), "units")
def __init__(self, Master, bg="orange red"):
self.master = Master
self.bg = bg
self.canvas = Canvas(self.master, bg=self.bg)
self.canvas.pack(side=LEFT, fill=BOTH, expand=TRUE)
self.scroller = ttk.Scrollbar(self.master, orient=VERTICAL, command=self.canvas.yview)
self.scroller.pack(side=RIGHT, fill=Y)

self.canvas.bind('<Configure>', lambda e:
self.frame = Frame(self.canvas, bg=self.bg, padx=10, pady=10)
self.canvas.create_window((0, 0), window=self.frame, anchor=NW)
self.frame.bind_all("<MouseWheel>", self._on_mouse_wheel)

priteshmehta
Автор

Great tutorial.
I searched this guide from long time.
Many thanks for all the videos about Tkinter .
You are an excellent teacher

michelelaino
Автор

I'm trying to create a GUI for my Python program, I chose to use tkinter, without knowing it is so counter intuitive, hard to understand and bad documented. Your videos are being very helpful, you are a life saver

francescobenedetti
Автор

I created scrollbar, it was slightly wrong, I rewatched video and now that's perfect, thank you so much

kostanchikplay
Автор

This is exactly what I needed right now. Great tutorial!

grzegorzbrzeczyszczykiewic
Автор

Changed the for loop buttons to text labels and changed colour to match canvas that way hiding them and only display the necessary widgets - works great : thanks !!

StephenHoban-ny
Автор

I can't thank you enough. Within one week of watching your videos, I was able to make very useful programs. Thanks John!!

khanaatifali
Автор

So great videos about Python and tkinter! Short and comprehensive, right on point! I like your style, thumbs up 👍💪

jesche
Автор

INTERESTING!!, FIRST ATTEMPT ON Wednesday, done successfully, Thank you for this nice Tutorial John

py_tok
Автор

How can i make the scroll bar configured to the mouse scroll ?

ramehharmouch
Автор

I've learned a lot from you John, i wish i could thank you enough

gabrielpena