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


Python Frame.config方法代码示例

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


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

示例1: concolefooter

# 需要导入模块: from Tkinter import Frame [as 别名]
# 或者: from Tkinter.Frame import config [as 别名]
    def concolefooter(self):
        footerframe = Frame(self.master)
        footerframe.config(padx=5, pady=5, bg=Styles.colours["darkGrey"])
        title = Message(footerframe, text="Console:",
                        justify=CENTER, bg=Styles.colours["darkGrey"],
                        foreground=Styles.colours["yellow"],
                        width=100, font=Styles.fonts["entry"])

        consoletext = Text(footerframe, height=5, width=80, bg=Styles.colours["darkGrey"],
                           foreground=Styles.colours["grey"], state=NORMAL, relief=FLAT, font=Styles.fonts["console"])
        consoletext.insert(END, "Welcome to Project Bi")
        consoletext.config(state=DISABLED)
        self.console.setconsolefield(consoletext)
        scroll = Scrollbar(footerframe, command=consoletext.yview, relief=FLAT)
        consoletext.configure(yscrollcommand=scroll.set)

        self.boptimize = yellowbutton(footerframe, "Optimize", 20, lambda e: self.observerstage())
        deactivatebutton(self.boptimize)
        self.boptimize.pack(side=RIGHT, fill=BOTH, padx=5, pady=5)
        self.boptimize.configure(font=Styles.fonts["h1Button"])

        title.pack(side=LEFT, fill=BOTH)
        scroll.pack(side=LEFT, fill=BOTH)
        consoletext.pack(side=LEFT, fill=BOTH)
        footerframe.grid(row=2, column=0, sticky=W + E + N + S, columnspan=2)

        return footerframe
开发者ID:jakedm,项目名称:projectb,代码行数:29,代码来源:maingui.py

示例2: Example

# 需要导入模块: from Tkinter import Frame [as 别名]
# 或者: from Tkinter.Frame import config [as 别名]
class Example(Frame):
  
    def __init__(self, parent):
        Frame.__init__(self, parent)   
         
        self.parent = parent        
        self.initUI()
        
        
    def initUI(self):
      
        self.parent.title("Color chooser")      
        self.pack(fill=BOTH, expand=1)
        
        self.btn = Button(self, text="Choose Color", 
            command=self.onChoose)
        self.btn.place(x=30, y=30)
        
        self.frame = Frame(self, border=1, 
            relief=SUNKEN, width=100, height=100)
        self.frame.place(x=160, y=30)


    def onChoose(self):
      
        (rgb, hx) = tkColorChooser.askcolor()
        self.frame.config(bg=hx)
开发者ID:kingraijun,项目名称:zetcode-tuts,代码行数:29,代码来源:colorchooser.py

示例3: show

# 需要导入模块: from Tkinter import Frame [as 别名]
# 或者: from Tkinter.Frame import config [as 别名]
 def show(text, background="#fff", timeout_ms=DEFAULT_TIMEOUT, font_size=100):
     root = Tk()
     root.attributes("-topmost", True)
     root.lift()
     # Set Timeout
     root.after(timeout_ms, root.destroy)
     # Create Frame
     frame = Frame(root)
     frame.pack(side=TOP, fill=BOTH, expand=YES)
     # Set frame size and position
     screen_width = frame.master.winfo_screenwidth()
     screen_heigh = frame.master.winfo_screenheight()
     w = screen_width * 0.8
     h = screen_heigh * 0.6
     # Center the window
     x = (screen_width/2) - (w/2)
     y = (screen_heigh/2) - (h/2)
     frame.master.geometry('%dx%d+%d+%d' % (w, h, x, y))
     # Adjust frame properties
     frame.master.overrideredirect(True)  # Set no border or title
     frame.config(bg=background)
     # Create text label
     label = Label(frame, text=text, wraplength=screen_width * 0.8)
     label.pack(side=TOP, expand=YES)
     label.config(bg=background, justify=CENTER, font=("calibri", font_size))
     # Set transparency
     root.wait_visibility(root)  # Needed for linux (and must come after overrideredirect)
     root.attributes('-alpha', 0.6)
     # Run Event loop
     root.mainloop()
开发者ID:eranbrodet,项目名称:NotiFire,代码行数:32,代码来源:screenSplasher.py

示例4: prior

# 需要导入模块: from Tkinter import Frame [as 别名]
# 或者: from Tkinter.Frame import config [as 别名]
    def prior(self):
        priorheader = headersmall(self.frame, text="Hyperprior Settings:")
        f = Frame(self.frame)
        f.config(padx=20, bg=Styles.colours["grey"])

        Message(f, text="Horseshoe Prior sn:", width=200, bg=Styles.colours["grey"], font=Styles.fonts["entry"]).grid(
            row=0, column=0, columnspan=2, sticky=W)
        epriorsnscale = smallentry(f, self.params["priorsnscale"], 15)
        mpriorsnscale = Message(f, text="scale:", width=32, bg=Styles.colours["grey"])
        mpriorsnscale.grid(row=1, column=0, columnspan=1, sticky=E)
        epriorsnscale.grid(row=1, column=1, columnspan=1, sticky=W)
        smallentryframetext(f, 1, 2, self.params["priorsnmin"], 15, "min:")

        Message(f, text="Log Normal Prior sf:", width=200, bg=Styles.colours["grey"], font=Styles.fonts["entry"]).grid(
            row=2, column=0, columnspan=2, sticky=W)
        f3 = Frame(f)
        smallentryframetext(f3, 0, 0, self.params["priorsfmu"], 10, "mu:")
        smallentryframetext(f3, 0, 2, self.params["priorsfsigma"], 10, "sigma:")
        smallentryframetext(f3, 0, 4, self.params["priorsfmin"], 10, "min:")
        f3.grid(row=3, column=0, columnspan=4)

        Message(f, text="Uniform Prior ell:", width=200, bg=Styles.colours["grey"], font=Styles.fonts["entry"]).grid(
            row=4, column=0, columnspan=2, sticky=W)
        smallentryframetext(f, 5, 0, self.params["priorella"], 15, "a:")
        smallentryframetext(f, 5, 2, self.params["priorellb"], 15, "b:")

        Message(f, text="Gaussian Prior mu:", width=200, bg=Styles.colours["grey"], font=Styles.fonts["entry"]).grid(
            row=6, column=0, columnspan=2, sticky=W)
        smallentryframetext(f, 7, 0, self.params["priormumu"], 15, "mu:")
        smallentryframetext(f, 7, 2, self.params["priormuvar"], 15, "var:")

        priorheader.grid(row=6, column=4, sticky=W, columnspan=1)
        Message(self.frame, text="You can set following parameters based on the variables defined in the GP section.",
                width=400, font=Styles.fonts["entry"], bg=Styles.colours["grey"]).grid(row=7, column=4, columnspan=2)
        f.grid(row=8, column=4, sticky=E + W, columnspan=2, rowspan=10)
开发者ID:jakedm,项目名称:projectb,代码行数:37,代码来源:selection.py

示例5: dimscheduler

# 需要导入模块: from Tkinter import Frame [as 别名]
# 或者: from Tkinter.Frame import config [as 别名]
    def dimscheduler(self):
        mischeader = headersmall(self.frame, text="Dimension Scheduler")
        f = Frame(self.frame)
        f.config(bg=Styles.colours["grey"])
        smallentryframetext(f, 0, 0, self.params["dims"], 7, "Set Size:")
        checkdimschel = Checkbutton(self.frame, text="Enable", variable=self.params["dimscheudler"], bg=Styles.colours["grey"])

        mischeader.grid(row=18, column=0, sticky=W, columnspan=2)
        checkdimschel.grid(row=19, column=0, sticky=W, columnspan=1, padx=15)
        f.grid(row=19, column=1, sticky=W + E, columnspan=1)
开发者ID:jakedm,项目名称:projectb,代码行数:12,代码来源:selection.py

示例6: initnumber

# 需要导入模块: from Tkinter import Frame [as 别名]
# 或者: from Tkinter.Frame import config [as 别名]
    def initnumber(self):
        f = Frame(self.frame)
        f.config(bg=Styles.colours["grey"])
        minitnumber = Message(f, text="Numbers of samples to sample:", width=300, bg=Styles.colours["grey"])
        einitnumber = smallentry(f, self.params["initializernum"], 10)

        minitnumber.grid(row=0, column=0, sticky=W, columnspan=1)
        einitnumber.grid(row=0, column=1, sticky=W, columnspan=1, padx=10)

        f.grid(row=9, column=0, sticky=W, columnspan=2)
开发者ID:jakedm,项目名称:projectb,代码行数:12,代码来源:selection.py

示例7: outputdir

# 需要导入模块: from Tkinter import Frame [as 别名]
# 或者: from Tkinter.Frame import config [as 别名]
 def outputdir(self):
     iframe = Frame(self.frame)
     iframe.config(padx=5, pady=5, bg=Styles.colours["grey"])
     iframe.grid(row=10, column=0, sticky=W + E + N + S, columnspan=3, rowspan=2)
     objheader = headersmall(iframe, text="Model Output Directory (Optional):")
     boutfile = yellowbutton(iframe, "Select Directory", 14, click=None)
     eoutfiledir = entry(iframe, self.params["outputdir"], 32, fileCheck=False, dir=True, button=boutfile)
     objheader.grid(row=0, column=0, sticky=W, columnspan=2)
     boutfile.grid(row=1, column=2, pady=5)
     eoutfiledir.grid(row=1, column=0, columnspan=2)
开发者ID:jakedm,项目名称:projectb,代码行数:12,代码来源:selection.py

示例8: advheader

# 需要导入模块: from Tkinter import Frame [as 别名]
# 或者: from Tkinter.Frame import config [as 别名]
    def advheader(self):
        headerframe = Frame(self.toplevel)
        headerframe.config(bg=Styles.colours["darkGrey"])
        advancedsettingsheader = Message(headerframe, text="Advanced Settings", bg=Styles.colours["darkGrey"],
                                         justify=CENTER, foreground=Styles.colours["yellow"], pady=5,
                                         width=200, font=Styles.fonts["h1"])
        qb = qbutton(headerframe)
        babout = camobutton(headerframe, "About", 10)
        advancedsettingsheader.pack(side=LEFT, fill=BOTH, padx=5, pady=5)

        qb.pack(side=RIGHT, fill=BOTH, padx=5, pady=5)
        babout.pack(side=RIGHT, fill=BOTH, padx=5, pady=5)
        headerframe.pack(fill=BOTH, pady=0)
开发者ID:jakedm,项目名称:projectb,代码行数:15,代码来源:selection.py

示例9: policyset

# 需要导入模块: from Tkinter import Frame [as 别名]
# 或者: from Tkinter.Frame import config [as 别名]
    def policyset(self):
        mischeader = headersmall(self.frame, text="Policy Parameters")
        fp = Frame(self.frame)
        fp.config(bg=Styles.colours["grey"])
        smallentryframetextv(fp, 0, 0, self.params["eixi"], 10, "EI xi:")
        smallentryframetextv(fp, 2, 0, self.params["pixi"], 10, "PI xi:")
        smallentryframetextv(fp, 0, 1, self.params["ucbdelta"], 10, "UCB delta:")
        smallentryframetextv(fp, 2, 1, self.params["ucbxi"], 10, "UCB xi:")
        smallentryframetextv(fp, 0, 2, self.params["thompsonn"], 10, "Thompson N:")
        smallentryframetextv(fp, 2, 2, self.params["thompsonrng"], 10, "Thompson RNG:")

        mischeader.grid(row=13, column=0, sticky=W, columnspan=2)
        fp.grid(row=14, column=0, rowspan=4, columnspan=2, sticky=W, padx=10)
开发者ID:jakedm,项目名称:projectb,代码行数:15,代码来源:selection.py

示例10: basicgp

# 需要导入模块: from Tkinter import Frame [as 别名]
# 或者: from Tkinter.Frame import config [as 别名]
    def basicgp(self):
        gpheader = headersmall(self.frame, text="Basic GP Settings:")
        f = Frame(self.frame)
        f.config(padx=20, bg=Styles.colours["grey"])
        gpsf, _ = smallentryframetext(f, 0, 0, self.params["gpsf"], 20, "sf:")
        gpmu, _ = smallentryframetext(f, 1, 0, self.params["gpmu"], 20, "mu:")
        Label(f, text="     ", bg=Styles.colours["grey"]).grid(row=0, column=2, sticky=W, rowspan=2)
        gpell, _ = smallentryframetext(f, 0, 3, self.params["gpell"], 20, "ell:")
        gpsn, _ = smallentryframetext(f, 1, 3, self.params["gpsn"], 20, "sn:")

        gpheader.grid(row=1, column=4, sticky=W, columnspan=1)
        Message(self.frame, text="You can use numpy and python syntax to set the parameters from the data where"
                                 " X is the initial and random data, and y is the corresponding output",
                width=400, font=Styles.fonts["entry"], bg=Styles.colours["grey"]).grid(row=2, column=4, columnspan=2, sticky=W)
        f.grid(row=3, column=4, sticky=W, columnspan=2, rowspan=3)
开发者ID:jakedm,项目名称:projectb,代码行数:17,代码来源:selection.py

示例11: mainheader

# 需要导入模块: from Tkinter import Frame [as 别名]
# 或者: from Tkinter.Frame import config [as 别名]
class mainheader():
    def __init__(self, master, console,params,maingui):
        self.frame = Frame(master)
        self.frame.config(padx=5, pady=5, bg=Styles.colours["darkGrey"])
        self.frame.grid(row=0, column=0, sticky=W + E + N + S,columnspan=2)
        self.title = Message(self.frame, text="ProjectB: Selection",
                        justify=CENTER, bg=Styles.colours["darkGrey"],
                        foreground=Styles.colours["yellow"],
                        width=300, font=Styles.fonts["h1"])

        def importsettings(event):
            f = tkFileDialog.askopenfilename(parent=master, title='Choose a file')
            parsemodifycustomvar(params,parsein(f,parseintosimple(params),console))
            maingui.ready("model")
            maingui.ready("bayes")

        def exportfile(event):
            f = tkFileDialog.asksaveasfilename(parent=master, title='Choose a file')
            parseout(f,parseintosimple(params),console)

        self.bimport = camobutton(self.frame, "Import Settings", 15,importsettings)
        self.bexport = camobutton(self.frame, "Export Settings", 15,exportfile)
        self.badvset = yellowbutton(self.frame, "Advanced Settings", 20)

        self.badvset.bind("<Button-1>", lambda a: AdvancedSettings(console,params))
        self.qb = qbutton(self.frame)

        self.title.pack(side=LEFT, fill=BOTH, padx=5, pady=5)
        self.qb.pack(side=RIGHT, fill=BOTH, padx=5, pady=5)
        self.badvset.pack(side=RIGHT, fill=BOTH, padx=5, pady=5)
        self.bexport.pack(side=RIGHT, fill=BOTH, padx=5, pady=5)
        self.bimport.pack(side=RIGHT, fill=BOTH, padx=5, pady=5)

    def destroy(self):
        self.frame.destroy()

    def observationstage(self):
        self.bimport.destroy()
        self.bexport.destroy()
        self.badvset.destroy()
        self.title.config(text="ProjectB: Observation")

    def evaluationstage(self):
        self.title.config(text="ProjectB: Evaluation")
开发者ID:jakedm,项目名称:projectb,代码行数:46,代码来源:header.py

示例12: __init__

# 需要导入模块: from Tkinter import Frame [as 别名]
# 或者: from Tkinter.Frame import config [as 别名]
    def __init__(self, notification_manager, builder, index, x, y, h, v, padx, pady, background=None, on_hide=None):
        Toplevel.__init__(self)
        
        self._notification_manager = notification_manager

        self.index = index
        self.on_hide = on_hide

        # Removes the native window boarder.
        self.overrideredirect(True)

        # Disables resizing of the widget.
        self.resizable(False, False)

        # Places window above all other windows in the window stack.
        self.wm_attributes("-topmost", True)

        notification_frame = Frame(self)
        notification_frame.pack(expand=True, fill=BOTH, padx=padx, pady=pady)

        top_row = Frame(notification_frame)
        top_row.pack(fill=X)
        
        if not hasattr(notification_manager, "_close_icon"):
            notification_manager._close_icon = PhotoImage(data="R0lGODlhEAAQAPeQAIsAAI0AAI4AAI8AAJIAAJUAAJQCApkAAJoAAJ4AAJkJCaAAAKYAAKcAAKcCAKcDA6cGAKgAAKsAAKsCAKwAAK0AAK8AAK4CAK8DAqUJAKULAKwLALAAALEAALIAALMAALMDALQAALUAALYAALcEALoAALsAALsCALwAAL8AALkJAL4NAL8NAKoTAKwbAbEQALMVAL0QAL0RAKsREaodHbkQELMsALg2ALk3ALs+ALE2FbgpKbA1Nbc1Nb44N8AAAMIWAMsvAMUgDMcxAKVABb9NBbVJErFYEq1iMrtoMr5kP8BKAMFLAMxKANBBANFCANJFANFEB9JKAMFcANFZANZcANpfAMJUEMZVEc5hAM5pAMluBdRsANR8AM9YOrdERMpIQs1UVMR5WNt8X8VgYMdlZcxtYtx4YNF/btp9eraNf9qXXNCCZsyLeNSLd8SSecySf82kd9qqc9uBgdyBgd+EhN6JgtSIiNuJieGHhOGLg+GKhOKamty1ste4sNO+ueenp+inp+HHrebGrefKuOPTzejWzera1O7b1vLb2/bl4vTu7fbw7ffx7vnz8f///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAJAALAAAAAAQABAAAAjUACEJHEiwYEEABniQKfNFgQCDkATQwAMokEU+PQgUFDAjjR09e/LUmUNnh8aBCcCgUeRmzBkzie6EeQBAoAAMXuA8ciRGCaJHfXzUMCAQgYooWN48anTokR8dQk4sELggBhQrU9Q8evSHiJQgLCIIfMDCSZUjhbYuQkLFCRAMAiOQGGLE0CNBcZYmaRIDLqQFGF60eTRoSxc5jwjhACFWIAgMLtgUocJFy5orL0IQRHAiQgsbRZYswbEhBIiCCH6EiJAhAwQMKU5DjHCi9gnZEHMTDAgAOw==")

        close_button = Button(top_row, image=notification_manager._close_icon, highlightthickness=0, borderwidth=0, command=self.close)
        close_button.pack(side=RIGHT, anchor=E)

        self.interior = Frame(notification_frame)
        self.interior.pack(expand=True, fill=BOTH)

        if builder:
            builder(self.interior)
        
        if background is not None:
            top_row.config(background=background)
            notification_frame.config(background=background)
            self.config(background=background)
            self.interior.config(background=background)
            close_button.config(background=background)
            
        self.place(x,y, h, v)
开发者ID:jacob-carrier,项目名称:code,代码行数:45,代码来源:recipe-580769.py

示例13: submitadvancedsettings

# 需要导入模块: from Tkinter import Frame [as 别名]
# 或者: from Tkinter.Frame import config [as 别名]
    def submitadvancedsettings(self):
        def destroywindow(event):
            self.toplevel.destroy()

        def canceladvc(event):
            for k, v in self.paramsdefaults.items():
                self.params[k].set(v)
            destroywindow(event)

        def submitadvc(event):
            self.paramsdefaults = dict((k, self.params[k].get()) for k in self.advsettingslist)
            destroywindow(event)

        f = Frame(self.toplevel)
        f.config(padx=15, pady=15, bg=Styles.colours["darkGrey"])
        submitadv = yellowbutton(f, "Submit", 30, submitadvc)
        canceladv = yellowbutton(f, "Cancel", 20, canceladvc)
        submitadv.pack(side=RIGHT)
        canceladv.pack(side=RIGHT, padx=20)
        f.pack(fill=X)
开发者ID:jakedm,项目名称:projectb,代码行数:22,代码来源:selection.py

示例14: startgraph

# 需要导入模块: from Tkinter import Frame [as 别名]
# 或者: from Tkinter.Frame import config [as 别名]
    def startgraph(self):
        #Older versions of matplot do not support style command
        try:
            pl.style.use('ggplot')
        except:
            pass
        root = Frame(self.frame)
        self.graphframem = root
        root.config(padx=20, pady=20, bg=Styles.colours["grey"])
        self.graphtype = StringVar(root)
        self.graphtype.set("Graph: Running Best (Overview)")  # initial value
        self.option = OptionMenu(root, self.graphtype, "Graph: Objective Value", "Graph: Running Best (Zoom)",
                                 "Graph: Running Best (Overview)", "Graph: Variance", "Graph: Variance (Last 25)",
                                 "Graph: Objective Value (Last 25)", "Graph: Running Best (Last 25)",
                                 "Graph: Time (seconds)")
        self.option.config(padx=5, pady=5,state=DISABLED, justify=LEFT, font=Styles.fonts["h1"], relief=FLAT,
                           highlightbackground=Styles.colours["yellow"], highlightthickness=1,
                           bg=Styles.colours["grey"])
        self.option.pack(fill=BOTH)

        def callback(*args):
            if not self.lockgraph:
                self.updategraph()

        self.graphtype.trace("w", callback)

        self.graphfigure = Figure(figsize=(6, 6), dpi=70, facecolor=Styles.colours["grey"])
        self.graphframe = self.graphfigure.add_subplot(111, axisbg=Styles.colours["darkGrey"])

        self.graphframe.set_xlabel('Iteration')
        self.graphframe.set_ylabel('Objective Value')
        canvas = FigureCanvasTkAgg(self.graphfigure, master=root)

        canvas.show()
        canvas.get_tk_widget().configure(background=Styles.colours["grey"], highlightcolor=Styles.colours["grey"],
                                         highlightbackground=Styles.colours["grey"])
        canvas.get_tk_widget().pack(side=Tk.TOP, fill=Tk.BOTH, expand=1)
        root.grid(row=0, column=0)
        canvas._tkcanvas.pack(side=Tk.TOP, fill=Tk.BOTH, expand=0)
开发者ID:jakedm,项目名称:projectb,代码行数:41,代码来源:observation.py

示例15: experimentdata

# 需要导入模块: from Tkinter import Frame [as 别名]
# 或者: from Tkinter.Frame import config [as 别名]
    def experimentdata(self):
        f = Frame(self.frame)
        self.experimentframe = f
        f.config(padx=20, pady=20, bg=Styles.colours["grey"])
        modeldetails = header(f, "Model:")
        fm = Frame(f)
        fm.config(padx=20, pady=20, bg=Styles.colours["grey"])
        infoh(fm, "Command:", self.params["command"].get(), 0, 0)
        infoh(fm, "Model Input:", self.params["modelinput"].get(), 1, 0)
        infoh(fm, "Model Output:", self.params["modeloutput"].get(), 2, 0)

        self.numexperitments = header(f, "Current Experiment: 0/0")
        _, self.iterinfo = infov(f, "Iteration:", "-", 5, 0)
        _, self.kernelinfo = infov(f, "Kernel:", "-", 5, 1)
        _, self.policyinfo = infov(f, "Policy:", "-", 5, 2)

        resultsframe = Frame(f)
        resultsframe.config(bg=Styles.colours["grey"])
        headersmall(resultsframe, "Best Result:       ").grid(row=0, column=0, sticky=W + E + N + S)

        Label(resultsframe, text="Current:", font=Styles.fonts["entry"], bg=Styles.colours["grey"], width=9).grid(row=0,
                                                                                                                  column=1,
                                                                                                                  sticky=E)
        self.curbestlabel = Label(resultsframe, bg=Styles.colours["grey"], text="-", width=20, font=Styles.fonts["h2"])
        self.curbestlabel.grid(row=0, column=2, sticky=W)

        Label(resultsframe, text="Overall:", font=Styles.fonts["entry"], bg=Styles.colours["grey"], width=9).grid(row=1,
                                                                                                                  column=1,
                                                                                                                  sticky=E)
        self.totbestlabel = Label(resultsframe, text=self.iniparams["totbest"], bg=Styles.colours["grey"], width=20,
                                  font=Styles.fonts["h2"])
        self.totbestlabel.grid(row=1, column=2, sticky=W)

        curresultsframe = Frame(f)
        curresultsframe.config(bg=Styles.colours["grey"])

        headersmall(curresultsframe, "Latest Iteration: ").grid(row=0, column=0, sticky=W + E + N + S)

        Label(curresultsframe, text="y:", font=Styles.fonts["entry"], bg=Styles.colours["grey"], width=9).grid(row=0,
                                                                                                               column=1,
                                                                                                               sticky=E)
        self.cury = Label(curresultsframe, text="-", width=20, font=Styles.fonts["h2"], bg=Styles.colours["grey"])
        self.cury.grid(row=0, column=2, sticky=W)

        Label(curresultsframe, text="mu:", font=Styles.fonts["entry"], bg=Styles.colours["grey"], width=9).grid(row=1,
                                                                                                                column=1,
                                                                                                                sticky=E)
        self.curmu = Label(curresultsframe, text=self.iniparams["totbest"], bg=Styles.colours["grey"], width=20,
                           font=Styles.fonts["h2"])
        self.curmu.grid(row=1, column=2, sticky=W)

        Label(curresultsframe, text="var:", font=Styles.fonts["entry"], bg=Styles.colours["grey"], width=9).grid(row=2,
                                                                                                                 column=1,
                                                                                                                 sticky=E)
        self.curvar = Label(curresultsframe, text=self.iniparams["totbest"], bg=Styles.colours["grey"], width=20,
                            font=Styles.fonts["h2"])
        self.curvar.grid(row=2, column=2, sticky=W)

        modeldetails.grid(row=0, column=0, columnspan=3, sticky=W + E + N + S)

        fm.grid(row=1, column=0, columnspan=3, sticky=W + E + N + S, padx=20)

        self.numexperitments.grid(row=4, column=0, columnspan=3, sticky=W + E + N + S)

        resultsframe.grid(row=7, column=0, columnspan=3, sticky=W + E + N + S)
        curresultsframe.grid(row=8, column=0, columnspan=3, sticky=W + E + N + S)
        f.grid(row=0, column=1, sticky=W + E + N + S)
开发者ID:jakedm,项目名称:projectb,代码行数:69,代码来源:observation.py


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