In this video we’ll look at Scrollbars with TTKBootstrap, Tkinter, and Python.

Scrollbars in TTKBootstrap are pretty simple.

You can change the colors to any of your regular TTKBoostrap bootstyles, you can also make them either square or rounded.

Python Code: scroller.py
(Github Code)

from tkinter import *
import ttkbootstrap as tb

root = tb.Window(themename="superhero")

#root = Tk()
root.title("TTK Bootstrap! Scrollbar")
root.iconbitmap('images/codemy.ico')
root.geometry('500x350')

# Frame
my_frame = tb.Frame(root)
my_frame.pack(pady=20)

# Create A Scrollbar
my_scroll = tb.Scrollbar(my_frame, orient='vertical', bootstyle="dark round")
my_scroll.pack(side="right", fill="y")

# Create A Text Widget
my_text = Text(my_frame, width=30, height=25, 
	yscrollcommand=my_scroll.set, wrap="none", font=("helvetica", 18))
my_text.pack()

# Config the scollbar
my_scroll.config(command=my_text.yview)


root.mainloop()


John Elder

John is the CEO of Codemy.com 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

John is the CEO of Codemy.com 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...