Assuming are referring to the border with the word "Title" in it, that is called a LabelFrame . Both the tkinter and ttk packages define a LabelFrame
class.
Example:
# python 2
# import Tkinter as tk
# import ttk
# python 3
import tkinter as tk
from tkinter import ttk
root = tk.Tk()
lf1 = tk.LabelFrame(root, text="Title (tkinter)", width=400, height=100)
lf2 = ttk.LabelFrame(root, text="Title (ttk)", width=400, height=100)
lf1.pack(side="top", fill="both", expand=True, padx=4, pady=4)
lf2.pack(side="top", fill="both", expand=True, padx=4, pady=4)
root.mainloop()
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.