In this video I’ll show you how to use the TTKBootstrap Separator and Sizegrip widgets for Tkinter and Python.

The Sizegrip Widget is a little triangle that allows you to resize your app by dragging and dropping.

The Separator Widget is just a thin line that is either horizontal or vertical.

We’ll look at both of them in this video.

Python Code: sep.py
(Github Code)

from tkinter import *
import ttkbootstrap as tb

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

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


label1 = tb.Label(root, text="Label 1", bootstyle="light")
label1.pack(pady=40)


# Separator
my_sep = tb.Separator(root, bootstyle="info", orient="horizontal")
my_sep.pack(fill="x", padx=100)

label2 = tb.Label(root, text="Label 2", bootstyle="light")
label2.pack(pady=40)

# Sizegrip
my_sizegrip = tb.Sizegrip(root, bootstyle="info")
my_sizegrip.pack(anchor="se", fill="both", expand=True)




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...