Mar-11-2019, 06:15 PM
there may be other ways to accomplish this but .pack_forget() works:
def wrap_text(self): self.use = self.wrap.get() if self.use: self.text.config(wrap=WORD) self.scrollbar_2.pack_forget() self.wrap.set(0) else: self.text.config(wrap=NONE) self.scrollbar_2.pack(fill=X, expand=NO) self.wrap.set(1)