In this video we’ll look at Toast Messages for TTKBootstrap, Tkinter, and Python.
Toast messages are little windows alert messages that pop up in the bottom corner of the screen.
They’re super easy with TTKBootstrap, and I’ll show you how to use them in this video.
In this video I’ll show you how to use the Scrolled Frame widget for TTKBootstrap and Tkinter.
Scrolled Frames are super easy with TTKBootstrap. Unlike regular Tkinter, TTKBootstrap has a scrolledFrame widget that you can use.
It really couldn’t be easier!
Python Code: toasty.py
(Github Code)
from tkinter import * import ttkbootstrap as tb from ttkbootstrap.toast import ToastNotification root = tb.Window(themename="superhero") #root = Tk() root.title("TTK Bootstrap! Toast Message!") root.iconbitmap('images/codemy.ico') root.iconbitmap(default='images/codemy.ico') root.geometry('300x200') def clicker(): toast.show_toast() toast = ToastNotification(title="My Toast Title", message="This is a Toast Message!! WOOHOO!!", duration=3000, alert=True, position=(-1915, 300, 'sw'), ) my_button = tb.Button(root, text="Click Me!", command=clicker) my_button.pack(pady=40) root.mainloop()
Add comment