giteasy/window.py

31 lines
704 B
Python
Raw Normal View History

2019-03-11 10:58:59 +00:00
from tkinter import *
2019-03-12 09:31:29 +00:00
from tkinter.ttk import *
2019-03-11 18:28:36 +00:00
from tkinter.messagebox import *
2019-03-11 10:58:59 +00:00
class Window(Frame):
def __init__(self, master = None):
2019-03-12 09:31:29 +00:00
super().__init__(master)
self.style = Style()
2019-03-11 10:58:59 +00:00
self.master = master
self.master = master
self.pack()
self.width = 800
self.height = 600
self.position = [10, 10]
def set_width(self, width):
self.width = width
def set_height(self, height):
self.height = height
def set_position(self, x=10, y=10):
self.position = [x, y]
def apply(self):
self.master.geometry("{0}x{1}+{2}+{3}".format(self.width, self.height, self.position[0], self.position[1]))