本文整理汇总了Python中Tkinter.Tk.minsize方法的典型用法代码示例。如果您正苦于以下问题:Python Tk.minsize方法的具体用法?Python Tk.minsize怎么用?Python Tk.minsize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tkinter.Tk
的用法示例。
在下文中一共展示了Tk.minsize方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: main
# 需要导入模块: from Tkinter import Tk [as 别名]
# 或者: from Tkinter.Tk import minsize [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 minsize [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: run
# 需要导入模块: from Tkinter import Tk [as 别名]
# 或者: from Tkinter.Tk import minsize [as 别名]
def run():
root = Tk()
root.title("Imgs2PDF")
root.geometry("%dx%d%+d%+d" % (600, 400, 0, 0))
root.minsize(600, 400)
app = MainWindow(master=root)
app.mainloop()
示例4: main
# 需要导入模块: from Tkinter import Tk [as 别名]
# 或者: from Tkinter.Tk import minsize [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()
示例5: main
# 需要导入模块: from Tkinter import Tk [as 别名]
# 或者: from Tkinter.Tk import minsize [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()
示例6: run
# 需要导入模块: from Tkinter import Tk [as 别名]
# 或者: from Tkinter.Tk import minsize [as 别名]
def run():
""" starting the interface
"""
from gui import GUI
from Tkinter import Tk
import system
root = Tk()
root.columnconfigure(0,weight=1)
root.rowconfigure(1,weight=1)
root.title(system.name + " " + system.version)
root.minsize(width= system.minwidth , height=system.minheight)
root.geometry(system.defsize)
gui = GUI(root)
gui.makeGUI()
root.iconbitmap('hat2.ico')
root.mainloop()
示例7: Label
# 需要导入模块: from Tkinter import Tk [as 别名]
# 或者: from Tkinter.Tk import minsize [as 别名]
Frame.__init__(self, master=root, border=2, relief='ridge')
self.pack(fill='x', side='top')
self.lbl_name = Label(self, text='reg_sp', border=1, relief='ridge')
self.lbl_name.pack(side='left', fill='x')
self.lblAdr = Label(self, text='adr', border=1, relief='groove',
bg='gray')
self.lblAdr.pack(side='left')
self.lblAdrVal = Label(self, text='0000', border=1, relief='groove')
self.lblAdrVal.pack(side='left')
self.lbl_val = Label(self, text='val', border=1, relief='groove',
bg='gray')
self.lbl_val.pack(side='left')
self.lblValVal = Label(self, text='0000', border=1, relief='groove')
self.lblValVal.pack(side='left')
if __name__ == '__main__':
from Tkinter import Tk
root = Tk()
root.title('test frm_reg_sp')
root.minsize(300, 200)
reg = ClsFrmRegPC(root=root)
reg.lbl_name['text'] = 'reg_sp'
root.mainloop()
示例8: Tk
# 需要导入模块: from Tkinter import Tk [as 别名]
# 或者: from Tkinter.Tk import minsize [as 别名]
if (data[0:6]=='mclear' and peer_id==my_ip):
print "clear?"
clear_request_received_time = time.time()
#layout initialization, start receiving thread
if __name__ == "__main__":
root = Tk()
root.title('Shared whiteboard')
root.config(bg='#ddd')
root.columnconfigure(2, weight=1)
root.rowconfigure(1, weight=1)
root.protocol("WM_DELETE_WINDOW", callback)
root.minsize(width=600, height=340)
root.bind('<<openIt!>>', myDialog)
root.bind('<<sorry>>', sorryDialog)
root.bind('<<new>>', refreshMessage)
canvas = Canvas(root, width=canvasWidth, height=canvasHeight, bg='#fff')
canvas.grid(column=0, row=1, sticky=(N, W, E, S), columnspan=7)
clearButton = Button(root, text="Clear everyone's canvas",
width = 20, command=clearCanvas)
clearButton.grid(column=0, row=0, padx=5, pady=5)
clearMyCanvas = Button(root, text="Clear my canvas", command=clearMyPressed,
width = 14)
clearMyCanvas.grid(column=1, row=0, pady=5)
示例9: refresh_googledrive_list
# 需要导入模块: from Tkinter import Tk [as 别名]
# 或者: from Tkinter.Tk import minsize [as 别名]
tkMessageBox.showinfo("Info!", "Downloaded " + _file_selected + " from Google Drive")
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')
示例10: Label
# 需要导入模块: from Tkinter import Tk [as 别名]
# 或者: from Tkinter.Tk import minsize [as 别名]
self.lbl_name.pack(side="left", fill="x")
self.lbl_break = Label(self, text="adr_break", border=1, relief="groove", bg="gray")
self.lbl_break.pack(side="left")
self.lbl_break_val = Label(self, text="0", border=1, relief="groove")
self.lbl_break_val.pack(side="left")
self.lbl_proc = Label(self, text="adr_proc", border=1, relief="groove", bg="gray")
self.lbl_proc.pack(side="left")
self.lbl_proc_val = Label(self, text="0", border=1, relief="groove")
self.lbl_proc_val.pack(side="left")
self.lbl_act = Label(self, text="flag_act", border=1, relief="groove", bg="gray")
self.lbl_act.pack(side="left")
self.lbl_act_val = Label(self, text="0", border=1, relief="groove")
self.lbl_act_val.pack(side="left")
if __name__ == "__main__":
from Tkinter import Tk
win_test = Tk()
win_test.title("test frmreg_pc")
win_test.minsize(300, 200)
reg = ClsFrmRegBP(root=win_test)
reg.lbl_name["text"] = "reg_pc"
win_test.mainloop()
示例11: TrackPlayer
# 需要导入模块: from Tkinter import Tk [as 别名]
# 或者: from Tkinter.Tk import minsize [as 别名]
track = persister.load(filename)
player = TrackPlayer(player_backend, track=track)
player.play()
try:
while player.playing:
try:
player.tick()
time.sleep(0.0001)
except:
player.stop()
raise
except KeyboardInterrupt:
pass
else:
from Tkinter import Tk
from gambolputty.gui.tk.track import TrackEditor
root = Tk()
root.minsize(800, 600)
main = TrackEditor(root, player_backend, persister, filename)
main.run()
try:
for channel in range(15):
player_backend.all_notes_off(channel)
except NoDeviceSelected:
pass
sys.exit(0)
示例12: TkApplicationWindow
# 需要导入模块: from Tkinter import Tk [as 别名]
# 或者: from Tkinter.Tk import minsize [as 别名]
class TkApplicationWindow(AbstractApplicationWindow):
def __init__(self, app):
self.root = Tk()
self.root.title("Llia")
self.root.config(background=factory.bg())
super(TkApplicationWindow, self).__init__(app, self.root)
self.root.withdraw()
if app.config()["enable-splash"]:
splash = TkSplashWindow(self.root, app)
self.root.deiconify()
self.root.protocol("WM_DELETE_WINDOW", self.exit_app)
self.llia_graph = None
self._main = layout.BorderFrame(self.root)
self._main.config(background=factory.bg())
self._main.pack(anchor="nw", expand=True, fill=BOTH)
self._progressbar = None
self._init_status_panel()
self._init_menu()
self._init_center_frame(self._main.center)
self.root.minsize(width=665, height=375)
self.group_windows = []
self.add_synth_group()
self._scene_filename = ""
def _init_status_panel(self):
south = self._main.south
south.configure(padx=4, pady=4)
self._lab_status = factory.label(south, "", modal=False)
b_panic = factory.panic_button(south)
b_down = factory.button(south, "-")
b_up = factory.button(south, "+")
b_panic.grid(row=0, column=0)
self._progressbar = Progressbar(south,mode="indeterminate")
self._progressbar.grid(row=0,column=PROGRESSBAR_COLUMN, sticky='w', padx=8)
self._lab_status.grid(row=0,column=4, sticky='w')
south.config(background=factory.bg())
b_down.configure(command=lambda: self.root.lower())
b_up.configure(command=lambda: self.root.lift())
self.update_progressbar(100, 0)
def _tab_change_callback(self, event):
self.llia_graph.sync()
def _init_center_frame(self, master):
nb = ttk.Notebook(master)
nb.pack(expand=True, fill="both")
frame_synths = layout.FlowGrid(nb, 6)
frame_efx = layout.FlowGrid(nb, 6)
frame_controllers = layout.FlowGrid(nb, 6)
self.llia_graph = LliaGraph(nb, self.app)
nb.add(frame_synths, text = "Synths")
nb.add(frame_efx, text = "Effects")
nb.add(frame_controllers, text = "Controllers")
nb.add(self.llia_graph, text="Graph")
nb.bind("<Button-1>", self._tab_change_callback)
def display_info_callback(event):
sp = event.widget.synth_spec
msg = "%s: %s" % (sp["format"],sp["description"])
self.status(msg)
def clear_info_callback(*_):
self.status("")
for st in con.SYNTH_TYPES:
sp = specs[st]
ttp = "Add %s Synthesizer (%s)" % (st, sp["description"])
b = factory.logo_button(frame_synths, st, ttip=ttp)
b.synth_spec = sp
b.bind("<Button-1>", self._show_add_synth_dialog)
b.bind("<Enter>", display_info_callback)
b.bind("<Leave>", clear_info_callback)
frame_synths.add(b)
for st in con.EFFECT_TYPES:
sp = specs[st]
ttp = "Add %s Effect (%s)" % (st, sp["description"])
b = factory.logo_button(frame_efx, st, ttip=ttp)
b.synth_spec = sp
b.bind("<Button-1>", self._show_add_efx_dialog)
b.bind("<Enter>", display_info_callback)
b.bind("<Leave>", clear_info_callback)
frame_efx.add(b)
for st in con.CONTROLLER_SYNTH_TYPES:
sp = specs[st]
ttp = "Add %s Effect (%s)" % (st, sp["description"])
b = factory.logo_button(frame_controllers, st, ttip=ttp)
b.synth_spec = sp
b.bind("<Button-1>", self._show_add_controller_dialog)
b.bind("<Enter>", display_info_callback)
b.bind("<Leave>", clear_info_callback)
frame_controllers.add(b)
@staticmethod
def menu(master):
m = Menu(master, tearoff=0)
m.config(background=factory.bg(), foreground=factory.fg())
return m
def _init_menu(self):
#.........这里部分代码省略.........
示例13: run_3
# 需要导入模块: from Tkinter import Tk [as 别名]
# 或者: from Tkinter.Tk import minsize [as 别名]
'nosetests my_first_test.py --with-selenium --browser=chrome')
def run_3(self):
os.system(
'nosetests my_first_test.py --with-selenium --demo_mode')
def run_4(self):
os.system(
'nosetests test_fail.py --with-selenium'
' --with-testing_base --demo_mode')
def run_5(self):
os.system(
'nosetests my_test_suite.py --with-selenium'
' --with-testing_base --report')
def run_6(self):
os.system(
'nosetests non_terminating_checks_test.py'
' --with-selenium --demo_mode')
def run_7(self):
os.system(
'nosetests my_test_suite.py --with-selenium --with-db_reporting')
if __name__ == "__main__":
root = Tk()
root.minsize(584, 444)
app = App(root)
root.mainloop()
示例14: len
# 需要导入模块: from Tkinter import Tk [as 别名]
# 或者: from Tkinter.Tk import minsize [as 别名]
if event: #Shift+scroll
if event.num == 5: #Scroll down
i = self.sl.index(self.focus) + 1
if i >= len(self.sl):
i = 0
elif event.num == 4: #Scroll up
i = self.sl.index(self.focus) - 1
if i < 0:
i = len(self.sl) - 1
elif title: #Click
i = self.sl.index(title)
self.focus = self.sl[i] #Setting new focus
self.d[self.focus].ent() #Entering focus
if __name__ == "__main__":
pflag = 0
path = None
for a in sys.argv:
if pflag:
path = str(a)
pflag = 0
elif str(a) == '-path':
pflag = 1
root = Tk()
root.minsize(580, 120)
root.title("noteTaker")
app = NoteGUI(master=root, path=path)
app.mainloop()
示例15: Label
# 需要导入模块: from Tkinter import Tk [as 别名]
# 或者: from Tkinter.Tk import minsize [as 别名]
self.lbl_val.pack(side='left')
self.lbl_flag_z = Label(self, text='Z', border=1, relief='ridge')
self.lbl_flag_z.pack(side='left', fill='x')
self.lbl_val_z = Label(self, text='0', border=1, relief='groove')
self.lbl_val_z.pack(side='left', fill='x')
self.lbl_flag_o = Label(self, text='O', border=1, relief='ridge')
self.lbl_flag_o.pack(side='left', fill='x')
self.lbl_val_o = Label(self, text='0', border=1, relief='groove')
self.lbl_val_o.pack(side='left', fill='x')
self.lbl_flag_c = Label(self, text='C', border=1, relief='ridge')
self.lbl_flag_c.pack(side='left', fill='x')
self.lbl_val_c = Label(self, text='0', border=1, relief='groove')
self.lbl_val_c.pack(side='left', fill='x')
if __name__ == '__main__':
from Tkinter import Tk
WIN_TEST = Tk()
WIN_TEST.title('test frm_reg')
WIN_TEST.minsize(300, 200)
REG = ClsFrmReg(root=WIN_TEST)
REG.lbl_name['text'] = '123'
WIN_TEST.mainloop()