scroll bar issue fixed

This commit is contained in:
Kaushal Kumar Agarwal 2018-06-26 15:44:26 +05:30 committed by GitHub
parent 5cdda05b14
commit 901e88a799
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

14
main.py
View File

@ -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)