Python Forum
[Tkinter] Vertical Tabs Alignment in Tkinter
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] Vertical Tabs Alignment in Tkinter
#1
Hi there, Need some help.
I want the tabs to be aligned in the panel from the left. I have made them vertically positioned but couldn't correct it's positioning. I don't know what I am doing wrong in the code.
Here is the code and it's result.

tabs_frame = Frame(self.root, bd=4, bg="White", relief=GROOVE)
tabs_frame.place(x=0, y=27, width=1598, height=790)

style = ttk.Style(tabs_frame)
style.configure('lefttab.TNotebook', tabposition='wn')
style.configure('TNotebook.Tab', padding=(40, 15, 30, 5))
ttk.Style().configure("TNotebook", background='maroon', foreground='white')

notebook = ttk.Notebook(tabs_frame, style='lefttab.TNotebook')
notebook.pack(fill=X)

frame1 = tk.Frame(notebook, bg='white', width=1431, height=780)
frame2 = tk.Frame(notebook, bg='white', width=1431, height=780)
frame3 = tk.Frame(notebook, bg='white', width=1431, height=780)
frame4 = tk.Frame(notebook, bg='white', width=1431, height=780)
frame5 = tk.Frame(notebook, bg='white', width=1431, height=780)
frame6 = tk.Frame(notebook, bg='white', width=1431, height=780)
frame7 = tk.Frame(notebook, bg='white', width=1431, height=780)
frame8 = tk.Frame(notebook, bg='white', width=1431, height=780)
frame9 = tk.Frame(notebook, bg='white', width=1431, height=780)
frame10 = tk.Frame(notebook, bg='white', width=1431, height=780)
frame11 = tk.Frame(notebook, bg='white', width=1431, height=780)
frame12 = tk.Frame(notebook, bg='white', width=1431, height=780)
frame13 = tk.Frame(notebook, bg='white', width=1431, height=780)
frame14 = tk.Frame(notebook, bg='white', width=1431, height=780)
frame15 = tk.Frame(notebook, bg='white', width=1431, height=780)
frame16 = tk.Frame(notebook, bg='white', width=1431, height=780)

notebook.add(frame1, text='Select Patient')
notebook.add(frame2, text='Pregnancy Form')
notebook.add(frame3, text='Birth Form')
notebook.add(frame4, text='Admission Form')
notebook.add(frame5, text='Exam Form')
notebook.add(frame6, text='Respiratory Form')
notebook.add(frame7, text='Fluids Form')
notebook.add(frame8, text='Daily Form')
notebook.add(frame9, text='Tracking From')
notebook.add(frame10, text='Diagnosis Form')
notebook.add(frame11, text='XRay Form')
notebook.add(frame12, text='Lab1 Form')
notebook.add(frame13, text='Lab2 Form')
notebook.add(frame14, text='Discharge Form')
notebook.add(frame15, text='Summary Form')
notebook.add(frame16, text='Other Form') 
Reply


Messages In This Thread
Vertical Tabs Alignment in Tkinter - by muhammadasim - Oct-04-2020, 06:48 PM
RE: Vertical Tabs Alignment in Tkinter - by Larz60+ - Oct-05-2020, 04:37 AM
RE: Vertical Tabs Alignment in Tkinter - by Larz60+ - Oct-05-2020, 08:40 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Found buttonstate in tabs MacTommu 4 2,007 Sep-22-2021, 05:56 PM
Last Post: deanhystad
  TabError: inconsistent use of tabs and spaces in indentation hobbyist 3 4,934 Jun-15-2021, 10:38 PM
Last Post: davide73_italy
  [Tkinter] Need help please properly putting tabs within a PanedWindow JackMack118 2 3,383 Dec-08-2019, 03:02 PM
Last Post: balenaucigasa
  [PyQt] Drag items across tabs Alfalfa 5 4,816 Sep-01-2019, 11:58 PM
Last Post: Alfalfa
  [Tkinter] Adding space between Notebook tabs Columbo 4 4,573 Jul-10-2019, 10:46 PM
Last Post: Columbo
  Require scroll bars horizontal and vertical throughout the window tejgandhi 2 2,724 Jun-28-2019, 03:13 AM
Last Post: tejgandhi
  [Tkinter] How to get a tabs works exactly same as google chrome sarthak260 0 3,801 Mar-07-2019, 10:45 AM
Last Post: sarthak260
  [Tkinter] showing results in TKInter as Vertical List diegoctn 4 3,261 Jan-18-2019, 02:33 PM
Last Post: diegoctn
  [Tkinter] How to create multilple tabs in tkinter from different classes Rishav 5 18,350 Jul-11-2018, 11:59 AM
Last Post: CCChris91
  How to create mutiple tabs in tkinter using oops Rishav 2 6,901 Jul-12-2017, 04:43 PM
Last Post: Rishav

Forum Jump:

User Panel Messages

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