Python Forum
Tkinter: multitab window
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tkinter: multitab window
#3
Thank you for your help! I'm having a little bit of trouble understending how to implementing the code/ using class.
This is how I've changed the code of my page2
class page2:
    def __init__(self, parent):
        self.title = 'Head'
        self.frame = tk.Frame(parent)
        for i, text in enumerate(head):
            story = tk.Label(self.frame, text=text)
            story.grid(row=i, column=0)

        self.scrollbar = Scrollbar(self)
        self.text = Text(self, padx = 10, pady = 10, spacing1 = 10, spacing2 = 1, bd = 2)
        self.scrollbar.pack(side=RIGHT, fill=Y)
        self.text.pack(side=LEFT, expand=True, fill=BOTH)
        self.scrollbar.config(command=self.text.yview)
        self.text.config(yscrollcommand=self.scrollbar.set, background="LIGHT GRAY")
        self.text.tag_configure('big', font=('times', 15, 'bold'), justify='center')
        self.text.tag_configure('normal', font=('times', 12))
        self.text.insert(END,'Instructions\n', 'big')
        quote = """Lorem ipsum dolor sit amet, consectetur adipiscing elit."""
        self.text.config(state=DISABLED)
And it's not working.But my even bigger problem is how should I change page1 class to make it works.
Thank you again for your help
Reply


Messages In This Thread
Tkinter: multitab window - by WizardMitMagi - Apr-19-2020, 11:37 AM
RE: Tkinter: multitab window - by deanhystad - Apr-19-2020, 03:12 PM
RE: Tkinter: multitab window - by WizardMitMagi - Apr-29-2020, 08:27 AM
RE: Tkinter: multitab window - by deanhystad - Apr-29-2020, 02:40 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Interaction between Matplotlib window, Python prompt and TKinter window NorbertMoussy 3 529 Mar-17-2024, 09:37 AM
Last Post: deanhystad
  Tkinter multiple windows in the same window tomro91 1 862 Oct-30-2023, 02:59 PM
Last Post: Larz60+
  Centering and adding a push button to a grid window, TKinter Edward_ 15 4,865 May-25-2023, 07:37 PM
Last Post: deanhystad
  [Tkinter] Open tkinter colorchooser at toplevel (so I can select/focus on either window) tabreturn 4 1,921 Jul-06-2022, 01:03 PM
Last Post: deanhystad
  [Tkinter] Background inactivity timer when tkinter window is not active DBox 4 2,935 Apr-16-2022, 04:04 PM
Last Post: DBox
  why my list changes to a string as I move to another window in tkinter? pymn 4 2,584 Feb-17-2022, 07:02 AM
Last Post: pymn
  [Tkinter] Tkinter Window Has no Title Bar gw1500se 4 2,869 Nov-07-2021, 05:14 PM
Last Post: gw1500se
  "tkinter.TclError: NULL main window" Rama02 1 5,871 Feb-04-2021, 06:45 PM
Last Post: deanhystad
  function in new window (tkinter) Dale22 7 5,170 Nov-24-2020, 11:28 PM
Last Post: Dale22
  Scrollable big image in a window (TKinter) Prospekteur 3 4,507 Sep-14-2020, 03:06 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

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