本文整理汇总了Python中tkinter.Tk.columnconfigure方法的典型用法代码示例。如果您正苦于以下问题:Python Tk.columnconfigure方法的具体用法?Python Tk.columnconfigure怎么用?Python Tk.columnconfigure使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tkinter.Tk
的用法示例。
在下文中一共展示了Tk.columnconfigure方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from tkinter import Tk [as 别名]
# 或者: from tkinter.Tk import columnconfigure [as 别名]
def __init__(self, title):
root = Tk()
root.title(title)
root.focus_set()
root.rowconfigure(0, weight=0)
root.columnconfigure(0, weight=1)
root.rowconfigure(1, weight=1)
self._root = root
self.menubar = Frame(root)
self.menubar.grid(row=0, column=0, sticky=(W, E))
self.menubar['takefocus'] = False
quit_button = Button(self.menubar, text='Quit', command=self.quit)
quit_button.grid(row=0, column=0)
self._menucolumn = 1
self.views = list()
self.paned_win = PanedWindow(root, orient=HORIZONTAL)
self.paned_win.grid(row=1, column=0, sticky=(N, S, W, E))
self._query = None
self._accept_func = None
self.sidebar_views = dict()
self.sidebar_count = 0
self.sidebar = PanedWindow(self.paned_win)
self.paned_win.add(self.sidebar, weight=1)
self.tabs = Notebook(self.paned_win)
self.tabs.enable_traversal()
self.paned_win.add(self.tabs, weight=5)
self.root = self.tabs
示例2: main
# 需要导入模块: from tkinter import Tk [as 别名]
# 或者: from tkinter.Tk import columnconfigure [as 别名]
def main():
"""Run screen in test window."""
from data_01_conflictModel import ConflictModel
root = Tk()
root.columnconfigure(0, weight=1)
root.rowconfigure(0, weight=1)
cFrame = ttk.Frame(root)
cFrame.columnconfigure(0, weight=1)
cFrame.rowconfigure(1, weight=1)
cFrame.grid(column=0, row=0, sticky=NSEW)
hSep = ttk.Separator(cFrame, orient=VERTICAL)
hSep.grid(column=1, row=0, rowspan=10, sticky=NSEW)
conf = ConflictModel()
conf.load_from_file("save_files/Garrison.gmcr")
testFrame = StabilityFrame(cFrame, conf)
if testFrame.hasRequiredData():
testFrame.buildFrame()
else:
print("data missing")
return
testFrame.enter()
root.mainloop()
示例3: create
# 需要导入模块: from tkinter import Tk [as 别名]
# 或者: from tkinter.Tk import columnconfigure [as 别名]
def create():
root=Tk()
root.columnconfigure(0, weight=1)
root.rowconfigure(0, weight=1)
gui = Gui(mockControl(), root)
gui.grid(sticky=E+W+S+N)
return (root, gui)
示例4: setupGui
# 需要导入模块: from tkinter import Tk [as 别名]
# 或者: from tkinter.Tk import columnconfigure [as 别名]
def setupGui():
global window
global labelShows, labelEpisodes, labelDownloads
global listShows, listEps, listDownloads
global btnAbout, btnDownload, btnChooseFolder
global folderFrame
global folderName
window = Tk()
window.title('iView')
window.minsize(300, 200)
labelShows = Label(window, text='Shows')
labelShows.grid(column=0, row=0, sticky=[N,S,E,W])
listShows = Listbox(window)
listShows.grid(column=0, row=1, sticky=[N,S,E,W])
listShows.bind('<<ListboxSelect>>', indexEpsEv)
indexShows()
labelEpisodes = Label(window, text='Episodes')
labelEpisodes.grid(column=1, row=0, sticky=[N,S,E,W])
listEps = Listbox(window)
listEps.grid(column=1, row=1, sticky=[N,S,E,W])
listEps.bind('<<ListboxSelect>>', setEpNumEv)
indexEps(0)
labelDownloads = Label(window, text='Downloads')
labelDownloads.grid(column=2, row=0, sticky=[N,S,E,W])
listDownloads = Listbox(window)
listDownloads.grid(column=2, row=1, sticky=[N,S,E,W])
btnAbout = Button(window, text='About', command=about)
btnAbout.grid(column=0, row=2, sticky=[N,S,E,W])
btnDownload = Button(window, text='Download', command=download)
btnDownload.grid(column=1, row=2, sticky=[N,S,E,W])
btnChooseFolder = Button(window, text='Choose Download Folder', command=chooseDir)
btnChooseFolder.grid(column=2, row=2, sticky=[N,S,E,W])
folderName = Text(window, height=1)
folderName.grid(column=0, row=3, columnspan=3)
folderName.insert(END, expanduser("~")+(':Videos:iView:'.replace(':', os.sep)))
window.columnconfigure(0, weight=1)
window.columnconfigure(1, weight=1)
window.columnconfigure(2, weight=1)
window.rowconfigure(1, weight=1)
def updateDownloadList():
refreshDownloadList()
window.after(1000, updateDownloadList)
dlListThrd = threading.Thread(target=updateDownloadList)
dlListThrd.setName('Update Download List')
dlListThrd.start()
示例5: main
# 需要导入模块: from tkinter import Tk [as 别名]
# 或者: from tkinter.Tk import columnconfigure [as 别名]
def main():
root = Tk()
root.columnconfigure(0, weight=1)
root.rowconfigure(0, weight=1)
g1 = ConflictModel('pris.gmcr')
res = InverseContent(root, g1)
res.grid(column=0, row=0, sticky=NSEW)
root.mainloop()
示例6: editSettings
# 需要导入模块: from tkinter import Tk [as 别名]
# 或者: from tkinter.Tk import columnconfigure [as 别名]
def editSettings(cls):
def commitSettings(messageInDialogIn):
try:
SettingsVars.DEFAULT_BOARD = defaultBoardBox.get()
SettingsVars.REFRESH_INTERVAL = int(refreshIntervalBox.get())
messageInDialogIn.destroy()
except ValueError:
messagebox.showwarning(message="Invalid Settings")
messageInDialogIn.focus_force()
settingsDialog = Tk()
settingsDialog.title('Settings')
try:
if os.name == "nt":
settingsDialog.wm_iconbitmap(bitmap='./gui/images/icon.ico')
except _tkinter.TclError:
pass
settingsDialog.columnconfigure(0, weight=1)
settingsDialog.rowconfigure(0, weight=1)
settingsDialog.minsize(width=100, height=50)
frame = Frame(settingsDialog)
refreshIntervalLabel = Label(frame)
refreshIntervalLabel['text'] = 'Refresh Interval'
refreshIntervalLabel.pack()
refreshIntervalBox = Entry(frame)
refreshIntervalBox.insert(0, cls.REFRESH_INTERVAL)
refreshIntervalBox.pack(fill='both')
defaultBoardLabel = Label(frame)
defaultBoardLabel['text'] = 'Default Board'
defaultBoardLabel.pack()
defaultBoardBox = Entry(frame)
defaultBoardBox.insert(0, cls.DEFAULT_BOARD)
defaultBoardBox.pack(fill='both')
submitButton = Button(frame)
submitButton['text'] = 'Ok'
submitButton['command'] = lambda: commitSettings(settingsDialog)
submitButton.pack(side="left", expand="yes", fill="both", padx=5, pady=3)
cancelButton = Button(frame)
cancelButton['text'] = 'Cancel'
cancelButton['command'] = settingsDialog.destroy
cancelButton.pack(fill='both', expand="yes", padx=5, pady=3)
frame.pack(fill='both', expand="yes", padx=0, pady=0)
return settingsDialog
示例7: main
# 需要导入模块: from tkinter import Tk [as 别名]
# 或者: from tkinter.Tk import columnconfigure [as 别名]
def main():
"""Run widget in test window."""
root = Tk()
root.columnconfigure(0, weight=1)
root.rowconfigure(0, weight=1)
g1 = ConflictModel('AmRv2.gmcr')
theTree = TreeInfeas(root, g1)
theTree.grid(column=0, row=0, sticky=NSEW)
root.mainloop()
示例8: main
# 需要导入模块: from tkinter import Tk [as 别名]
# 或者: from tkinter.Tk import columnconfigure [as 别名]
def main():
"""Run widget in test window."""
root = Tk()
root.columnconfigure(0, weight=1)
root.rowconfigure(0, weight=1)
g1 = ConflictModel('Prisoners.gmcr')
FeasView = FeasDisp(root, g1)
FeasView.grid(column=0, row=0, sticky=NSEW)
root.mainloop()
示例9: main
# 需要导入模块: from tkinter import Tk [as 别名]
# 或者: from tkinter.Tk import columnconfigure [as 别名]
def main():
"""Run widget in test window."""
root = Tk()
root.columnconfigure(0, weight=1)
root.rowconfigure(0, weight=1)
g1 = ConflictModel()
g1.load_from_file('Examples/SyriaIraq.gmcr')
theTree = TreeInfeas(root, g1)
theTree.grid(column=0, row=0, sticky=NSEW)
root.mainloop()
示例10: main
# 需要导入模块: from tkinter import Tk [as 别名]
# 或者: from tkinter.Tk import columnconfigure [as 别名]
def main():
"""Run widget in test window."""
root = Tk()
root.columnconfigure(0, weight=1)
root.rowconfigure(0, weight=1)
g1 = ConflictModel('Prisoners.gmcr')
radFrame = RadiobuttonEntry(root, g1)
radFrame.grid(column=0, row=0, sticky=(N, W))
root.mainloop()
print(radFrame.getStates())
示例11: main
# 需要导入模块: from tkinter import Tk [as 别名]
# 或者: from tkinter.Tk import columnconfigure [as 别名]
def main():
"""Run widget in test window."""
root = Tk()
root.columnconfigure(0, weight=1)
root.rowconfigure(0, weight=1)
g1 = ConflictModel()
g1.load_from_file('Examples/SyriaIraq.gmcr')
radFrame = RadiobuttonEntry(root, g1)
radFrame.grid(column=0, row=0, sticky=(N, W))
root.mainloop()
print(radFrame.getStates())
示例12: main
# 需要导入模块: from tkinter import Tk [as 别名]
# 或者: from tkinter.Tk import columnconfigure [as 别名]
def main():
"""Run screen in test window."""
root = Tk()
root.columnconfigure(0, weight=1)
root.rowconfigure(0, weight=1)
cFrame = ttk.Frame(root)
cFrame.columnconfigure(0, weight=1)
cFrame.rowconfigure(1, weight=1)
cFrame.grid(column=0, row=0, sticky=NSEW)
hSep = ttk.Separator(cFrame, orient=VERTICAL)
hSep.grid(column=1, row=0, rowspan=10, sticky=NSEW)
testConflict = ConflictModel('SyriaIraq.gmcr')
testFrame = PreferenceRankingFrame(cFrame, testConflict)
testFrame.enter()
root.mainloop()
示例13: main
# 需要导入模块: from tkinter import Tk [as 别名]
# 或者: from tkinter.Tk import columnconfigure [as 别名]
def main():
"""Run screen in test window."""
root = Tk()
root.columnconfigure(0, weight=1)
root.rowconfigure(0, weight=1)
cFrame = ttk.Frame(root)
cFrame.columnconfigure(0, weight=1)
cFrame.rowconfigure(1, weight=1)
cFrame.grid(column=0, row=0, sticky=NSEW)
hSep = ttk.Separator(cFrame, orient=VERTICAL)
hSep.grid(column=1, row=0, rowspan=10, sticky=NSEW)
g1 = ConflictModel('AmRv2.gmcr')
testFrame = DMInpFrame(cFrame, g1)
testFrame.enter()
root.mainloop()
示例14: main
# 需要导入模块: from tkinter import Tk [as 别名]
# 或者: from tkinter.Tk import columnconfigure [as 别名]
def main():
"""Run screen in test window."""
root = Tk()
root.columnconfigure(0, weight=1)
root.rowconfigure(0, weight=1)
cFrame = ttk.Frame(root)
cFrame.columnconfigure(0, weight=1)
cFrame.rowconfigure(1, weight=1)
cFrame.grid(column=0, row=0, sticky=NSEW)
hSep = ttk.Separator(cFrame, orient=VERTICAL)
hSep.grid(column=1, row=0, rowspan=10, sticky=NSEW)
g1 = ConflictModel()
g1.load_from_file('Examples/SyriaIraq.gmcr')
testFrame = MisperceptionFrame(cFrame, g1)
testFrame.enter()
root.mainloop()
示例15: Gui
# 需要导入模块: from tkinter import Tk [as 别名]
# 或者: from tkinter.Tk import columnconfigure [as 别名]
from gui import Gui
from time import sleep
from control import defaultControl, Control, Mover
from traceback import print_exc
import socket
from tkinter import Tk, E, W, S, N, Label
from tkinter.font import nametofont
root=Tk()
root.columnconfigure(0, weight=1)
root.rowconfigure(0, weight=1)
try:
control=defaultControl()
gui = Gui(control, root)
gui.grid(sticky=E+W+S+N)
except (OSError, socket.error) as e:
print_exc()
root.configure(width=200, height=200)
root.bind("<Escape>", lambda x: root.quit())
l=Label(root, text="Нет связи")
l.grid()
nametofont(l["font"]).config(size=80)
root.mainloop()