giteasy/info.py

28 lines
854 B
Python
Raw Permalink Normal View History

2019-03-12 09:31:29 +00:00
from tkinter import *
from tkinter.ttk import *
from tkinter.messagebox import *
import window
class Info(window.Window):
2019-03-13 05:03:30 +00:00
def __init__(self, master=None, type="Entry", title = "INFO"):
2019-03-12 09:31:29 +00:00
super().__init__(master)
2019-03-13 05:03:30 +00:00
master.title(title)
2019-03-12 09:31:29 +00:00
if type is "Combobox":
info_type = Combobox(self)
else:
info_type = Entry(self)
self.information_label = Label(self)
self.information = info_type
self.ok = Button(self)
self.draw_widgets()
2019-03-13 05:03:30 +00:00
self.master = master
2019-03-12 09:31:29 +00:00
def draw_widgets(self):
self.information_label["text"] = "Info: "
self.information_label.grid(row=0, column=0)
self.information.grid(row=0, column=1)
self.ok["text"] = "OK"
self.ok.grid(row=0, column=2)
def set_click(self, func):
self.ok["command"] = func