Python Forum
What kind of widget is it?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What kind of widget is it?
#1
Hi guys,

someone can help me to understand what kind of widget has been circled in red in the attached image?

I would very like to replicate it in my GUI but I don't know how. it seems a "LabelFrame" widget (I attached another image), but it's not the same. How can I create the same widget with tkinter?

sorry guys, maybe it's an obvious question, but I don't know tkinter so much, I started studying recently.

Attached Files

Thumbnail(s)
       
Reply
#2
I believe what you are looking to use would be the ttk.Separator.

import tkinter as tk
from tkinter import ttk

root = tk.Tk()
# PADX aligns the Separator clearance from edge of left side and right side
PADX = 5

toolbar = tk.Frame(root).grid(padx=100, pady=10)

button1 = tk.Button(toolbar, text="Home").grid(padx=10,pady=10)
sep = ttk.Separator(toolbar, orient=tk.HORIZONTAL).grid(padx=PADX * 2, pady=10, sticky=tk.EW)
sepL =tk.Label(toolbar, text="   Using a 'ttk.Separator' widget").grid(padx=PADX, sticky=tk.W)
button2 = tk.Button(toolbar, text="Insert").grid(padx=50, pady=10)

root.mainloop()
I hope this helps and points you in the right direction.
"Often stumped... But never defeated."
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  'Your first program' type question, be kind davediamond 0 1,047 Apr-11-2022, 08:12 PM
Last Post: davediamond
  Avoid multiple windows of the same kind backermaster 1 2,220 Oct-30-2018, 08:32 AM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020