From 901e88a7992d5caaec6ed332ee35d9e298d8efe6 Mon Sep 17 00:00:00 2001 From: Kaushal Kumar Agarwal Date: Tue, 26 Jun 2018 15:44:26 +0530 Subject: [PATCH] scroll bar issue fixed --- main.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/main.py b/main.py index 5228523..3caf1d7 100755 --- a/main.py +++ b/main.py @@ -237,11 +237,11 @@ class GUI: PL3 = Label(self.PostFrame,text="Enter the message to be encrypted") PL3.grid(row=3, column =1, columnspan=2) PTextFrame = Frame(self.PostFrame) - self.PTextBox = Text(PTextFrame,height=10,width=50) PScroll = Scrollbar(PTextFrame) - PScroll.config( command = self.PTextBox.yview ) + PScroll.pack(side=RIGHT, fill=Y) + self.PTextBox = Text(PTextFrame, height=10, width=50,yscrollcommand=PScroll.set) self.PTextBox.pack(side = LEFT) - PScroll.pack(side = RIGHT,fill = Y ) + PScroll.config(command=self.PTextBox.yview) PTextFrame.grid(column=1,columnspan=2) PBackButton = Button(self.PostFrame,text="Back",command=self.Main) PBackButton.grid(row=5, column =1) @@ -340,14 +340,14 @@ class GUI: GL3 = Label(self.GetFrame, text="Found Secret Message") GL3.grid(column=1, columnspan=2) GTextFrame = Frame(self.GetFrame) - self.GLMsg = Text(GTextFrame,height=10,width=50) + GScroll = Scrollbar(GTextFrame) + GScroll.pack(side=RIGHT, fill=Y) + self.GLMsg = Text(GTextFrame,height=10,width=50,yscrollcommand=GScroll.set) self.GLMsg.insert(END, plaintext) self.GLMsg.config(state='disabled') - GScroll = Scrollbar(GTextFrame) - GScroll.config( command = self.GLMsg.yview ) self.GLMsg.pack(side = LEFT) - GScroll.pack(side = RIGHT,fill = Y) GTextFrame.grid(column=1,columnspan=2) + GScroll.config(command=self.GLMsg.yview) self.CopyButton = Button(self.GetFrame, text="Copy", command=pyperclip.copy(plaintext)) self.CopyButton.grid(column=1) self.GBackButton=Button(self.GetFrame,text="Back",command=self.Main)