2020-08-11 03:36:33 +00:00
|
|
|
<snippet>
|
|
|
|
<content><![CDATA[
|
|
|
|
import tkinter
|
|
|
|
|
|
|
|
class Application:
|
|
|
|
def __init__(self):
|
|
|
|
self.windowtitle = 'Window'
|
|
|
|
|
|
|
|
self.t = tkinter.Tk()
|
|
|
|
self.t.title(self.windowtitle)
|
|
|
|
w = 800
|
|
|
|
h = 525
|
|
|
|
screenwidth = self.t.winfo_screenwidth()
|
|
|
|
screenheight = self.t.winfo_screenheight()
|
|
|
|
windowwidth = w
|
|
|
|
windowheight = h
|
|
|
|
windowx = (screenwidth-windowwidth) / 2
|
|
|
|
windowy = ((screenheight-windowheight) / 2) - 27
|
|
|
|
self.geometrystring = '%dx%d+%d+%d' % (windowwidth, windowheight, windowx, windowy)
|
|
|
|
self.t.geometry(self.geometrystring)
|
|
|
|
|
|
|
|
self.build_gui_manager()
|
|
|
|
|
|
|
|
def build_gui_manager(self):
|
|
|
|
pass
|
|
|
|
|
|
|
|
def mainloop(self):
|
|
|
|
self.t.mainloop()
|
|
|
|
]]></content>
|
2021-05-07 01:37:20 +00:00
|
|
|
<tabTrigger>tktemplate</tabTrigger>
|
2020-08-11 03:36:33 +00:00
|
|
|
</snippet>
|