|
6 | 6 | from tkinter import messagebox as mbox
|
7 | 7 | from tkinter.constants import *
|
8 | 8 | from tkinterweb import HtmlFrame
|
| 9 | +from tkinterweb.utilities import ScrolledTextBox |
9 | 10 |
|
10 | 11 | from markdown import Markdown
|
11 | 12 | from pygments import lex
|
@@ -139,11 +140,11 @@ def __init__(self, master, **kwargs):
|
139 | 140 |
|
140 | 141 | # Creating the widgets
|
141 | 142 | self.editor_pw = tk.PanedWindow(self.master, orient="horizontal")
|
142 |
| - self.editor_frame = tk.Frame(self.editor_pw) |
143 |
| - self.text_area = tk.Text(self.editor_frame, state="normal", wrap="none", pady=2, padx=3, undo=True, width=100, height=25, yscrollcommand=self.on_mousewheel) |
144 |
| - self.text_area.pack(side="left", fill="both", expand=1) |
145 |
| - self.scrollbar = tk.Scrollbar(self.editor_frame, command=self.on_scrollbar) |
146 |
| - self.scrollbar.pack(side="left", fill="y") |
| 143 | + self.editor_frame = ScrolledTextBox(self.editor_pw) |
| 144 | + self.text_area = self.editor_frame.tbox#tk.Text(self.editor_frame, state="normal", wrap="none", pady=2, padx=3, undo=True, width=100, height=25, yscrollcommand=self.on_mousewheel) |
| 145 | +## self.text_area.pack(side="left", fill="both", expand=1) |
| 146 | +## self.scrollbar = tk.Scrollbar(self.editor_frame, command=self.on_scrollbar) |
| 147 | +## self.scrollbar.pack(side="left", fill="y") |
147 | 148 | self.preview_area = HtmlFrame(self.editor_pw)
|
148 | 149 | self.editor_pw.add(self.editor_frame)
|
149 | 150 | self.editor_pw.add(self.preview_area)
|
|
0 commit comments