-
Notifications
You must be signed in to change notification settings - Fork 0
/
GuiOutput.py
22 lines (20 loc) · 875 Bytes
/
GuiOutput.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from Tkinter import *
import textbox as textbox
class output:
def __init__(self, mytab):
self.myout = textbox.textbox(mytab, 0, 0)
self.myout.readonly(True)
mytab.columnconfigure(0, weight=1)
mytab.rowconfigure(0, weight=1)
clearbutton = Button(mytab, text="Clear", command=self.myout.clear)
clearbutton.grid(row=2, column=0, sticky=(E,W))
def set(self, text, title=None, insert=True):
self.myout.readonly(False)
if title:
self.myout.set(title, insert, "title")
self.myout.set("\n", insert)
self.myout.set(text, insert)
self.myout.set("\n", insert)
self.myout.set("-----------------------------------------------------------------------------------------", insert)
self.myout.set("\n", insert)
self.myout.readonly(True)