本文整理汇总了Python中Tkinter.Tk.maxsize方法的典型用法代码示例。如果您正苦于以下问题:Python Tk.maxsize方法的具体用法?Python Tk.maxsize怎么用?Python Tk.maxsize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tkinter.Tk
的用法示例。
在下文中一共展示了Tk.maxsize方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: from Tkinter import Tk [as 别名]
# 或者: from Tkinter.Tk import maxsize [as 别名]
def main():
''' Main loop '''
root = Tk()
root.minsize(720,640) # To not allow resizing of the window
root.maxsize(720,640) # ''
app = MainPage(root)
root.mainloop()
示例2: main
# 需要导入模块: from Tkinter import Tk [as 别名]
# 或者: from Tkinter.Tk import maxsize [as 别名]
def main():
''' Main loop '''
w, h = 720, 640
root = Tk()
root.minsize(w, h) # To not allow resizing of the window
root.maxsize(w, h) # ''
app = StaffArea(root)
root.mainloop()
示例3: main
# 需要导入模块: from Tkinter import Tk [as 别名]
# 或者: from Tkinter.Tk import maxsize [as 别名]
def main():
root = Tk()
root.geometry('800x600')
root.title('Inventory Manager')
root.update()
root.minsize(root.winfo_width(), root.winfo_height())
root.maxsize(root.winfo_width(), root.winfo_height())
App(root).pack(fill='both', side='top', expand=True)
root.mainloop()
示例4: main
# 需要导入模块: from Tkinter import Tk [as 别名]
# 或者: from Tkinter.Tk import maxsize [as 别名]
def main():
myThread = PollingThread(q_visibility, logging)
myThread.start()
root_window = Tk()
root_window.title('Phoenix Launch Controller')
root_window.minsize(240, 300)
root_window.maxsize(240, 300)
showLogin(root_window)
root_window.mainloop()
示例5: __init__
# 需要导入模块: from Tkinter import Tk [as 别名]
# 或者: from Tkinter.Tk import maxsize [as 别名]
class MyGUI:
def __init__(self):
self.__mainWindow = Tk()
self.outdoor = True
self.indoor = False
self.RWidth=self.__mainWindow.winfo_screenwidth()
self.RHeight=self.__mainWindow.winfo_screenheight()
self.__mainWindow.geometry(("%dx%d")%(self.RWidth,self.RHeight))
self.__mainWindow.maxsize(width=480, height=320)
self.__mainWindow.attributes("-fullscreen", True)
self.but_frame = Frame(self.__mainWindow, pady=5, padx=5, height=60, width=self.RWidth)
self.but_frame.pack(side=BOTTOM, anchor=W)
self.exitbtn = Button(self.but_frame, text="Quit", font=("Helvetica", 14), command=self.__mainWindow.destroy)
self.outdoorbtn = Button(self.but_frame, text="Outdoor", font=("Helvetica", 14), command=self.show_hide_int)
self.indoorbtn = Button(self.but_frame, text="Indoor", font=("Helvetica", 14), command=self.show_hide_int)
self.but_frame.pack_propagate(0)
self.exitbtn.pack(side=LEFT)
self.outdoorbtn.pack(side=RIGHT)
self.indoorbtn.pack(padx=5, side=RIGHT)
self.ext_frame = Frame(self.__mainWindow)
self.ext_frame.pack(side=LEFT)
self.ext_title_label = Label(self.ext_frame, text = 'Outdoor Conditions', font=("Helvetica", 18), pady = 5)
self.ext_title_label.pack(pady=5, side=TOP)
self.ext_cond_frame = Frame(self.ext_frame, height=self.RHeight, width=self.RWidth/4)
self.ext_cond_frame.pack_propagate(0)
self.ext_cond_frame.pack(side=LEFT)
self.ext_initlabelText = 'Temperature: '
self.ext_initLabel = Label(self.ext_cond_frame, text = self.ext_initlabelText, font=("Helvetica", 14))
self.ext_initLabel.pack(padx=5, pady=5, anchor= W)
self.ext_initlabelText = 'Feels like: '
self.ext_initLabel = Label(self.ext_cond_frame, text = self.ext_initlabelText, font=("Helvetica", 14))
self.ext_initLabel.pack(padx=5, pady=5, anchor= W)
self.ext_initlabelText = 'Humidity: '
self.ext_initLabel = Label(self.ext_cond_frame, text = self.ext_initlabelText, font=("Helvetica", 14))
self.ext_initLabel.pack(padx=5, pady=5, anchor= W)
self.ext_cond2_frame = Frame(self.ext_frame, height=self.RHeight, width=self.RWidth/4)
self.ext_cond2_frame.pack_propagate(0)
self.ext_cond2_frame.pack(side=LEFT)
self.ext_temp_labelText = 'Loading...'
self.ext_temp_Label = Label(self.ext_cond2_frame, text = self.ext_temp_labelText, font=("Helvetica", 14))
self.ext_temp_Label.pack(padx=5, pady=5, anchor= W)
self.ext_feels_labelText = 'Loading...'
self.ext_feels_Label = Label(self.ext_cond2_frame, text = self.ext_feels_labelText, font=("Helvetica", 14))
self.ext_feels_Label.pack(padx=5, pady=5, anchor= W)
self.ext_rh_labelText = 'Loading...'
self.ext_rh_Label = Label(self.ext_cond2_frame, text = self.ext_rh_labelText, font=("Helvetica", 14))
self.ext_rh_Label.pack(padx=5, pady=5, anchor= W)
print "Empiezo a mirar el tiempo"
self.__mainWindow.after(1000, self.task)
print "termino de mirar el tiempo"
mainloop()
print "despues del loop"
def show_hide_int(self):
if self.indoor==False:
self.indoor = True
self.draw_int()
print 'indoor true'
else:
self.indoor = False
self.int_frame.pack_forget()
print 'indoor false'
def draw_int(self):
self.int_frame = Frame(self.__mainWindow, pady = 5)
self.int_frame.pack(side=RIGHT)
self.int_title_label = Label(self.int_frame, text = 'Indoor Conditions', font=("Helvetica", 18))
self.int_title_label.pack(pady=5, side=TOP)
self.int_cond_frame = Frame(self.int_frame, height=self.RHeight, width=self.RWidth/4)
self.int_cond_frame.pack_propagate(0)
self.int_cond_frame.pack(side=LEFT)
self.int_initlabelText = 'Temperature: '
self.int_initLabel = Label(self.int_cond_frame, text = self.int_initlabelText, font=("Helvetica", 14))
self.int_initLabel.pack(padx=5, pady=5, anchor= W)
self.int_initlabelText = 'Humidity: '
self.int_initLabel = Label(self.int_cond_frame, text = self.int_initlabelText, font=("Helvetica", 14))
self.int_initLabel.pack(padx=5, pady=5, anchor= W)
self.int_initlabelText = 'Pressure: '
self.int_initLabel = Label(self.int_cond_frame, text = self.int_initlabelText, font=("Helvetica", 14))
self.int_initLabel.pack(padx=5, pady=5, anchor= W)
self.int_initlabelText = 'CO2: '
self.int_initLabel = Label(self.int_cond_frame, text = self.int_initlabelText, font=("Helvetica", 14))
self.int_initLabel.pack(padx=5, pady=5, anchor= W)
self.int_cond2_frame = Frame(self.int_frame, height=self.RHeight, width=self.RWidth/4)
self.int_cond2_frame.pack_propagate(0)
self.int_cond2_frame.pack(side=LEFT)
self.int_temp_labelText = str(self.conditions[4])+ u"\u00b0"+'C'
self.int_temp_Label = Label(self.int_cond2_frame, text = self.int_temp_labelText, font=("Helvetica", 14))
self.int_temp_Label.pack(padx=5, pady=5, anchor= W)
self.int_rh_labelText = str(self.conditions[5])+' %'
self.int_rh_Label = Label(self.int_cond2_frame, text = self.int_rh_labelText, font=("Helvetica", 14))
self.int_rh_Label.pack(padx=5, pady=5, anchor= W)
self.int_pressure_labelText = str(self.conditions[6])+ ' mbar'
self.int_pressure_humidityLabel = Label(self.int_cond2_frame, text = self.int_pressure_labelText, font=("Helvetica", 14))
self.int_pressure_humidityLabel.pack(padx=5, pady=5, anchor= W)
self.int_co2_labelText = str(self.conditions[7])+' ppm'
self.int_co2_Label = Label(self.int_cond2_frame, text = self.int_co2_labelText, font=("Helvetica", 14))
self.int_co2_Label.pack(padx=5, pady=5, anchor= W)
#.........这里部分代码省略.........
示例6: refresh_googledrive_list
# 需要导入模块: from Tkinter import Tk [as 别名]
# 或者: from Tkinter.Tk import maxsize [as 别名]
def refresh_googledrive_list():
_listbox_googleDrive.delete(0, END)
# _list_file = _client_googledrive.listGoogleDriveFiles()
# for _file in _list_file:
# _listbox_googleDrive.insert(END, str(_file).replace("/",""))
#Create the objects to communicate with DBox
_client_dropbox = dropbox_client.DropBox()
# _client_googledrive = googledrive_client.GoogleDrive()
#Create a Main Window to display
MainWindow = Tk()
MainWindow.title('Cloud Sync')
MainWindow.minsize(500, 500)
MainWindow.maxsize(500, 500)
#Create tabs
_tabs = Notebook(MainWindow)
_tabs.pack(fill='both', expand='yes')
_tab_upload = Text(MainWindow)
_tab_dropBox = Text(MainWindow)
_tab_googleDrive = Text(MainWindow)
#Add tabs to the Main Window
_tabs.add(_tab_upload, text='Upload')
_tabs.add(_tab_dropBox, text='Dropbox')
_tabs.add(_tab_googleDrive, text='Google Drive')
#Label is used to display information to user
示例7: Tk
# 需要导入模块: from Tkinter import Tk [as 别名]
# 或者: from Tkinter.Tk import maxsize [as 别名]
import Tkinter
import Image
import ImageTk
from Tkinter import Tk
from Tkinter import *
import os
#attendance.py Integrity! Offsite 11:30 Pings 40 50 17
master = Tk()
master.title("PyAttendance Gui")
master.iconbitmap(default='icon.ico')
master.minsize(width=300, height=100)
master.maxsize(width=1000, height=1000)
canvas = Canvas(width = 300, height = 100)
canvas.pack(expand = YES, fill = BOTH)
image = ImageTk.PhotoImage(file = "logo.gif")
canvas.create_image(20, 5, image = image, anchor = NW)
StatusLabel = Label(canvas, text="Status Name:")
StatusLabel.grid(row=0,column=0)
StatusLabel.pack()
status = Entry(canvas)
status.grid(row=0,column=1)
status.pack()
ReturnLabel = Label(canvas, text="Return Time:")
示例8: open
# 需要导入模块: from Tkinter import Tk [as 别名]
# 或者: from Tkinter.Tk import maxsize [as 别名]
for inp_file in file_list:
with open(inp_file) as f:
document = f.read()
# Get the table which contains words, count
w_counter = parse_document(document)
# Create a table [word, [url, count]]
small_table = create_small_table(w_counter, inp_file)
add_to_big_table(small_table)
print 'Done indexing'
print 'Indexed', len(file_list), 'files.'
# UI comes here
root = Tk()
root.maxsize(640, 480)
root.minsize(640, 480)
e = Entry(root, width=100)
e.pack()
glob_text = e
b = Button(root, text="Search", command=start_search)
b.pack()
root.mainloop()
示例9: showinfo
# 需要导入模块: from Tkinter import Tk [as 别名]
# 或者: from Tkinter.Tk import maxsize [as 别名]
else:
# Добавляем изображение с помеченными дефектами на форму
b, g, r = cv2.split(result)
temp_image = cv2.merge((r, g, b))
temp_image = Image.fromarray(temp_image)
query_resized = temp_image.resize((300, 300), Image.ANTIALIAS)
query_image = ImageTk.PhotoImage(query_resized)
query_image_canv.itemconfigure(imgobj2, image=query_image, anchor=NW)
else:
showinfo('Warning', 'Заполните все поля.')
# Создаем форму и все ее компоненты
root = Tk()
root.title("Поиск дефектов печатных плат")
root.minsize(700, 450)
root.maxsize(700, 450)
f_1 = Frame(root, width=700, height=450) # рамка
# Компоненты открытия эталонного изображения
model_path_label = Label(f_1, text='Введите путь к эталонному изображению платы')
model_path_entry = Entry(f_1, width=37, bd=3) # текстовое поле
model_path_entry.insert(END, r'.\test\nodef1.bmp')
open_model_button = Button(f_1, text='Открыть', command=open_model_image)
# Компоненты ввода порогового значения
sensitivity_label = Label(f_1, text='Введите пороговое\nзначение')
sensitivity_entry = Entry(f_1, width=20, bd=3)
sensitivity_entry.insert(END, '0,01')
# Компоненты ввода числа частей при сегментации
num_of_parts_label = Label(f_1, text='Введите число частей при\nсегментации по X и Y')
示例10: BaseForm
# 需要导入模块: from Tkinter import Tk [as 别名]
# 或者: from Tkinter.Tk import maxsize [as 别名]
class BaseForm(object):
# input first set of points
firstPointsSet = True
points = [[], [], []]
def __init__(self, _width = 600, _height = 400):
self.root = Tk()
self.width = _width
self.height = _height
self.root.title("Construction of triangulation")
self.root.minsize(width = _width, height = _height)
self.root.maxsize(width = _width, height = _height)
self.canvas = Canvas(self.root, width = _width, height = _height, bg = "white")
self.canvas.pack()
self.root.bind('<Button-1>', self.ClickMouse)
self.b1 = Button(self.root, bg = "white", fg = "black", text = "Second points set", command = self.SecondPointsSet)
self.b1.place(x = 50, y = _height - 50)
self.b2 = Button(self.root, bg = "white", fg = "black", text = "Triangulation", command = self.Run)
self.b2.place(x = 200, y = _height - 50)
self.b3 = Button(self.root, bg = "white", fg = "black", text = "Experiment", command = self.Experiment)
self.b3.place(x = 325, y = _height - 50)
self.b4 = Button(self.root, bg = "white", fg = "black", text = "Errors", command = self.FindErrors)
self.b4.place(x = 425, y = _height - 50)
self.b5 = Button(self.root, bg = "white", fg = "black", text = "Time", command = self.ExperimentTime)
self.b5.place(x = 500, y = _height - 50)
def ClickMouse(self, event):
if not self.preprocessingDone:
getX = event.x_root
getY = event.y_root
posRootX = self.root.winfo_rootx()
posRootY = self.root.winfo_rooty()
x = getX - posRootX
y = getY - posRootY
p = [x, y]
self.points[not self.firstPointsSet].append(p)
draw.Point(self.canvas, p, "black", 3, not self.firstPointsSet)
def SecondPointsSet(self):
self.firstPointsSet = False
def Run(self):
raise NotImplementedError('This function must be implemented within child class!')
def Experiment(self):
raise NotImplementedError('This function must be implemented within child class!')
def FindErrors(self):
raise NotImplementedError('This function must be implemented within child class!')
def ExperimentTime(self):
raise NotImplementedError('This function must be implemented within child class!')
示例11: pywall
# 需要导入模块: from Tkinter import Tk [as 别名]
# 或者: from Tkinter.Tk import maxsize [as 别名]
def pywall(jenkins_url, wall_views, score_view, dbname):
root = Tk()
PyWallFrame(root, wall_views, score_view, dbname, jenkins_url)
root.geometry("%dx%d+0+0" % root.maxsize())
root.mainloop()