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


Python Tk.wm_title方法代码示例

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


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

示例1: main

# 需要导入模块: from tkinter import Tk [as 别名]
# 或者: from tkinter.Tk import wm_title [as 别名]
def main():
    resolution = load_resolution()
    root = Tk()
    root.geometry(resolution)
    root.wm_title('PiMenu')
    if len(sys.argv) > 1 and sys.argv[1] == 'fs':
        root.wm_attributes('-fullscreen', True)
    app = PiMenu(root)
    root.mainloop()
开发者ID:derphilipp,项目名称:pimenu,代码行数:11,代码来源:pimenu.py

示例2: main

# 需要导入模块: from tkinter import Tk [as 别名]
# 或者: from tkinter.Tk import wm_title [as 别名]
def main():
    window = Tk()
    window.geometry('1366x768')
    window.attributes('-fullscreen', True)
    window.wm_title('GUIDO')
    gui = GUI(window)
    window.mainloop()
开发者ID:xistingsherman,项目名称:SPTOR,代码行数:9,代码来源:Main.py

示例3: startGui

# 需要导入模块: from tkinter import Tk [as 别名]
# 或者: from tkinter.Tk import wm_title [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

示例4: display_blank_table

# 需要导入模块: from tkinter import Tk [as 别名]
# 或者: from tkinter.Tk import wm_title [as 别名]
def display_blank_table():
    """Open the window to show an empty table."""
    table_img = Image.open('..\images\poker-table-felt.jpg')
    window_handle = Tk()
    window_handle.wm_title('Networked Poker Game')
    canvas = Canvas(window_handle, width=1000, height=600)
    display_image(canvas, table_img)
    return canvas, table_img
开发者ID:echase6,项目名称:network_poker,代码行数:10,代码来源:client_gui.py

示例5: init_screen

# 需要导入模块: from tkinter import Tk [as 别名]
# 或者: from tkinter.Tk import wm_title [as 别名]
 def init_screen(self):
     # intialise screen and turn off auto-render
     root = Tk()
     root.wm_title(self.window_title)
     window = TK.Canvas(master=root, width=self.width, height=self.height)
     window.pack()
     self.screen = TurtleScreen(window)
     self.screen.tracer(0, 0)
开发者ID:zeth,项目名称:turtlepower,代码行数:10,代码来源:world.py

示例6: create_window

# 需要导入模块: from tkinter import Tk [as 别名]
# 或者: from tkinter.Tk import wm_title [as 别名]
def create_window():

	"""Creates window object, sets title and resizing."""

	root = Tk()

	root.wm_title("Word Counter")
	root.wm_resizable(0, 0)

	return root
开发者ID:Ap0c,项目名称:WordCounter,代码行数:12,代码来源:counter.py

示例7: file_section

# 需要导入模块: from tkinter import Tk [as 别名]
# 或者: from tkinter.Tk import wm_title [as 别名]
 def file_section(file_type, file_ext):
     root = Tk()
     root.wm_title("Import Workout For Analisis")
     file =  filedialog.askopenfilename(
         initialdir = "",
         title = "choose your file",
         filetypes = ((file_type,"*"+file_ext),("all files","*.*"))
         )
     root.destroy()
     return file
开发者ID:mctrinkle,项目名称:workout-analyzer,代码行数:12,代码来源:workout_analyzer.py

示例8: __init__

# 需要导入模块: from tkinter import Tk [as 别名]
# 或者: from tkinter.Tk import wm_title [as 别名]
class Loadbar:
    def __init__(self,size):
        self.loadbar = Tk()
        self.loadbar.wm_title('Loading')
        self.pgb = Progressbar(self.loadbar,orient='horizontal',length='500',maximum=int(size))
        self.pgb.pack()
        self.pgb.start()
    def start(self):
        self.loadbar.mainloop()
    def kill(self):
        self.loadbar.destroy()
开发者ID:bretttjohnson1,项目名称:Duplicate_Discoverer,代码行数:13,代码来源:hash_directories.py

示例9: main

# 需要导入模块: from tkinter import Tk [as 别名]
# 或者: from tkinter.Tk import wm_title [as 别名]
def main():
    # 创建顶层窗口
    top = Tk()

    # 设置窗口标题
    top.wm_title('Hello')

    # 在top上创建4个标签对象,并分别指定行、列位置
    Label(top,text = 'Hello World').grid(row = 0,column = 0)
    Label(top, text = 'Hello Python').grid(row = 0,column = 1)
    Label(top, text = 'Hello Tkinter').grid(row = 0,column = 2)
    Label(top, text='你好!').grid(row = 1,column = 1)

    # 执行主循环,显示GUI
    tkinter.mainloop()
开发者ID:dnxbjyj,项目名称:python-basic,代码行数:17,代码来源:hello_world.py

示例10: popupmsg

# 需要导入模块: from tkinter import Tk [as 别名]
# 或者: from tkinter.Tk import wm_title [as 别名]
def popupmsg(msg):
    popup = Tk()
    popup.wm_title("Alarm Condition")
    popup.configure(background='#FFE6E6')
    label = Label(popup, text=msg, font=NORM_FONT, fg = '#460303', bg='#FFE6E6')
    label.pack(side="top", fill="x", pady=10)
    B1 = Button(popup, text="Dismiss", bg='red',command=popup.destroy)
    B1.pack()
    if messagebox.askyesno("Acknowledge Alarm?",msg):
        plcWrite3.write_xv()
        Logger.Logit("ACK",msg)
        popup.destroy
    else :
        Logger.Logit("Not ACK",msg)
    popup.mainloop()       
开发者ID:FeMonky,项目名称:PLC-Notify,代码行数:17,代码来源:popper.py

示例11: __init__

# 需要导入模块: from tkinter import Tk [as 别名]
# 或者: from tkinter.Tk import wm_title [as 别名]
    def __init__(self):
        Tk.__init__(self)
        Tk.wm_title(self, 'Five in a Row')

        container = Frame(self)
        container.pack(side='top', fill='both', expand=True)
        container.grid_rowconfigure(0, weight=1)
        container.grid_columnconfigure(0, weight=1)

        self.frames = {}
        frame = GameUI(container, self)
        self.frames[GameUI] = frame
        frame.grid(row=0, column=0, sticky='nsew')

        self.show_frame(GameUI)
开发者ID:francoischalifour,项目名称:ju-python-labs,代码行数:17,代码来源:game.py

示例12: TkTimerCore

# 需要导入模块: from tkinter import Tk [as 别名]
# 或者: from tkinter.Tk import wm_title [as 别名]
class TkTimerCore(TimerCore):
    def __init__(self, *args, title, font_size, **kwargs):
        def close_handler(event):
            self.close()
        def clicked_handler(event):
            self.interact()

        self.master = Tk()
        self.master.wm_title(title)
        self.master.bind('<Destroy>', close_handler)
        self.label = Label(self.master, font='Sans {}'.format(int(font_size)))
        self.label.pack(expand=True)

        self.control = Toplevel()
        self.control.wm_title(title + ' (control)')
        self.control.minsize(150, 150)
        self.control.bind('<Destroy>', close_handler)
        self.button = Button(self.control, text='Start/Pause')
        self.button.bind('<ButtonRelease>', clicked_handler)
        self.button.pack(expand=True)

        self.timeout_running = False

        super().__init__(*args, **kwargs)

    def start_timeout(self):
        assert self.timeout_running is False
        def timeout_call():
            if self.timeout_running:
                self.update()
                self.master.after(25, timeout_call)
        self.timeout_running = True
        timeout_call()

    def stop_timeout(self):
        assert self.timeout_running is True
        self.timeout_running = False

    def mainloop(self):
        return self.master.mainloop()

    def shutdown(self):
        self.master.quit()

    def set_label_text(self, text, finished=False):
        self.label.config(text=text)
        if finished:
            self.label.config(fg='red')
开发者ID:tifv,项目名称:jtimer,代码行数:50,代码来源:tk.py

示例13: startGui

# 需要导入模块: from tkinter import Tk [as 别名]
# 或者: from tkinter.Tk import wm_title [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

示例14: run

# 需要导入模块: from tkinter import Tk [as 别名]
# 或者: from tkinter.Tk import wm_title [as 别名]
def run(*args):
    # Create the GUI for the program
    window = Tk()
    window.wm_title("pesto_check") # change the window title to pesto_check
    text = Text(window, height=3, width=65, bg="black", padx=5, pady=5, 
            highlightthickness=1)
    text.pack()
    
    # Tag configs for green/red font color
    text.tag_config("green", foreground="green")
    text.tag_config("red", foreground="red")
    
    # Set GUI position on screen (we'll put it on the upper-right hand corner)
    window.update_idletasks() # make sure that the width is up to date
    width = window.winfo_screenwidth()
    size = tuple(int(_) for _ in window.geometry().split('+')[0].split('x'))
    x = width - size[0]
    window.geometry("%dx%d+%d+%d" % (size + (x, 0)))
    
    """Searches specified websites for pesto and outputs the results."""
    # The path to the PhantomJS executable (shown below) will need to be changed on your system
    # Example path: /Users/owenjow/pesto_check/phantomjs/bin/phantomjs
    driver = webdriver.PhantomJS("[PATH-TO-phantomjs]") ### CHANGE THIS ###
    driver.wait = WebDriverWait(driver, 5)
    
    # Search UCB dining hall menus
    search_and_output(driver, "http://goo.gl/VR8HpB", text, "DC", False)
    # Search the Cheese Board weekly menu
    search_cheeseboard_and_output(driver, text)
    # Search the Sliver weekly menu
    search_sliver_and_output(driver, text)
    
    # Bring the Tkinter window to the front
    window.lift()
    window.attributes("-topmost", True)
    
    text.configure(state="disabled") # there's no need to allow user input!
    mainloop()
    driver.quit()
开发者ID:ohjay,项目名称:pesto_check,代码行数:41,代码来源:search.py

示例15: about

# 需要导入模块: from tkinter import Tk [as 别名]
# 或者: from tkinter.Tk import wm_title [as 别名]
def about():
    win = Tk()
    win.wm_title("About")
    frame1 = Frame(master=win, bg="#FFFF66")
    frame1.pack(fill="both", expand="yes")
    editArea = ScrolledText(master=frame1, wrap=WORD, width=30, height=10)
    # Don't use widget.place(), use pack or grid instead, since
    # They behave better on scaling the window -- and you don't
    # have to calculate it manually!
    editArea.pack(padx=10, pady=10, fill=BOTH, expand=True)
    # Adding some text in About.
    editArea.insert(
        INSERT,
        """\
	This Software was created by Vipul Vaibhaw as a second year undergrad at Fergusson College,Pune.
	I am a maths student there.
	This software was programmed in Python 2.7 .
	Tkinter was used to create GUI version.
	[email protected], mail me for doubts, queries or any other stuff.
	""",
    )
    editArea.configure(state="disabled")  # To make ScrolledText read-only, unlike our root window.
    win.mainloop()
开发者ID:vaibhawvipul,项目名称:TextEditor-Python,代码行数:25,代码来源:TextEditor_VaibhawLabs.py


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