当前位置: 首页>>代码示例>>Python>>正文


Python Tk.wm_minsize方法代码示例

本文整理汇总了Python中tkinter.Tk.wm_minsize方法的典型用法代码示例。如果您正苦于以下问题:Python Tk.wm_minsize方法的具体用法?Python Tk.wm_minsize怎么用?Python Tk.wm_minsize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在tkinter.Tk的用法示例。


在下文中一共展示了Tk.wm_minsize方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: startGui

# 需要导入模块: from tkinter import Tk [as 别名]
# 或者: from tkinter.Tk import wm_minsize [as 别名]
def startGui():
    try:
        import_tk()
    except:
        logging.error("Error Starting GUI. Could Not Find Tkinter module" + "Please install the Python Tkinter module")
        return

    root = Tk()
    root.wm_title("Eagle V6 to KiCad Converter")
    root.wm_minsize(400, 200)
    frame = Frame(root, relief=RIDGE, bg="BLUE", borderwidth=2)
    frame.pack(fill=BOTH, expand=1)

    label = Label(frame, font=20, bg="BLUE", text="What Would You Like to Do:")
    label.pack(fill=X, expand=1)

    butBrd = Button(frame, text="Convert Board", command=convertBoardGUI)
    butBrd.pack(fill=X, expand=1)
    butLib = Button(frame, text="Convert Library", command=convertLibGUI)
    butLib.pack(fill=X, expand=1)
    butSch = Button(frame, text="Convert Schematic", command=convertSchGUI)
    butSch.pack(fill=X, expand=1)

    label = Label(frame, bg="BLUE", text="www.github.com/Trump211")
    label.pack(fill=X, expand=1)

    root.mainloop()
开发者ID:DanChianucci,项目名称:Eagle2Kicad,代码行数:29,代码来源:Start.py

示例2: startGui

# 需要导入模块: from tkinter import Tk [as 别名]
# 或者: from tkinter.Tk import wm_minsize [as 别名]
def startGui():
	root=Tk()
	root.wm_title("Eagle V6 to Kicad Converter")
	root.wm_minsize(400,200)
	frame = Frame(root, relief=RIDGE, bg="BLUE", borderwidth=2)
	frame.pack(fill=BOTH,expand=1)
	
	label = Label(frame, font=20, bg="BLUE", text="What Would You Like to Do:")
	label.pack(fill=X, expand=1)
	
	butBrd = Button(frame, text="Convert Board",command=convertBoardGUI)
	butBrd.pack(fill=X,expand=1)
	butLib = Button(frame, text="Convert Library",command=convertLibGUI)
	butLib.pack(fill=X,expand=1)
	butSch = Button(frame, text="Convert Schematic",command=convertSchGUI)
	butSch.pack(fill=X,expand=1)
	
	label = Label(frame,bg="BLUE", text="www.github.com/Trump211")
	label.pack(fill=X, expand=1)
	
	root.mainloop()
开发者ID:yoneken,项目名称:Eagle2Kicad,代码行数:23,代码来源:Start.py

示例3: coefficient

# 需要导入模块: from tkinter import Tk [as 别名]
# 或者: from tkinter.Tk import wm_minsize [as 别名]
                messagebox.showinfo(title="Correlation p-value", message="The p-value for a %s correlation coefficient (of %s) computed on %s samples is: %s" %(correlation_type, correlation_coefficient, number_of_samples, p_value))
            ###################### Significance
            if p_value <= level_of_significance:
                messagebox.showinfo(title="Significance", message="The calculated correlation coefficient IS statistically significant at a level of significance of %s" %(level_of_significance))
            else:
                messagebox.showinfo(title="Significance", message="The calculated correlation coefficient is NOT statistically significant at a level of significance of %s" %(level_of_significance))




################################################ INPUT
# Root window
root = Tk()
root.title("Correlation coefficient significance")
root.resizable(True,True)
root.wm_minsize(width=450, height=150)
# Labels
coefficient_label = Label(root, text="Correlation coefficient")
number_of_samples_label = Label(root, text="Number of samples")
tails_label = Label(root, text="Tails")
correlation_type_label = Label(root, text="Correlation type")
level_of_significance_label = Label(root, text="Level of significance")
# Label positions
coefficient_label.grid(row=0, column=0)
number_of_samples_label.grid(row=1, column=0)
tails_label.grid(row=2, column=0)
correlation_type_label.grid(row=3, column=0)
level_of_significance_label.grid(row=4, column=0)
# Entry boxes
enter_coefficient = Entry(root)
enter_number_of_samples = Entry(root)
开发者ID:gmanuel89,项目名称:Public-Python,代码行数:33,代码来源:Correlation+coefficient+p-value+calculator+(Python+3+TclTk).py

示例4: __init__

# 需要导入模块: from tkinter import Tk [as 别名]
# 或者: from tkinter.Tk import wm_minsize [as 别名]
class IO:
    
    def __init__(self, thread):
         
       # set up screen, width = 512, height = 256

        self.mythread = thread
        self.screen = Tk()
        self.screen.title("Jarvis Simulator")
        self.screen.geometry("512x256+1600+500")
        self.screen.wm_maxsize(width=512, height=256)
        self.screen.wm_minsize(width=512, height=256)
        self.screen.wm_resizable(width=False, height=False)

        self.image = PhotoImage(width = 512, height = 256)

        self.label = Label(self.screen, image=self.image)

        self.label.grid()

        # set up keyboard

        for c in self.Keycodes.keys():
            exec("self.screen.bind(\"<%s>\", self.%s)" % (c, c))

        self.screen.bind("<Any-KeyPress>", self.KeyPressed)
        self.screen.bind("<Any-KeyRelease>", self.KeyReleased)

        system("xset r off")
        self.screen.protocol("WM_DELETE_WINDOW", self.delete_callback)

    def delete_callback(self):
        system("xset r on")
        self.mythread.stop()
        self.screen.destroy()
        
        
        
    KBD = 0
    
    Keycodes = { "Return"     : 128,
                 "BackSpace"  : 129,
                 "Left"       : 130,
                 "Up"         : 131,
                 "Right"      : 132,
                 "Down"       : 133,
                 "Home"       : 134,
                 "End"        : 135,
                 "Prior"      : 136,
                 "Next"       : 137,
                 "Insert"     : 138,
                 "Delete"     : 139,
                 "Escape"     : 140 }

    for i in range(1,13):
        k = { "F" + str(i) : 140+i }
        Keycodes.update(k)

    for key in Keycodes.keys():
        code = Keycodes[key]

        exec("""def %s(self, event):
                    self.KBD = %s
                    if debugKBD:
                        print(%s)""" % (key, code, code))

    def KeyPressed(self, event):

        if event.char:
            self.KBD = ord(event.char)
            if debugKBD:
                print(str(ord(event.char)))

    def KeyReleased(self, event):

        self.KBD = 0

        if debugKBD:
            print("Key Released.\n")


    def drawFill(self, color):

        horizontal_line = "{" + " ".join([color]*self.image.width()) + "}"
        self.image.put(" ".join([horizontal_line] * self.image.height()))

    def drawPoint(self, x, y, color):

        #~ print("Drawing %s point at (%i, %i)" % (color, x, y))

        self.image.put(color, (x, y))

    def drawmem(self, location, value):

        (y, x) = divmod(location,32)

        x = x * 16

        memword = binary(value, bits=16)
        
#.........这里部分代码省略.........
开发者ID:cakesmith,项目名称:Firefly,代码行数:103,代码来源:Jarvis.py


注:本文中的tkinter.Tk.wm_minsize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。