Apr-29-2020, 08:27 AM
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
Thank you again for your help
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