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


Python Tkinter.E属性代码示例

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


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

示例1: __createWidgets

# 需要导入模块: import Tkinter [as 别名]
# 或者: from Tkinter import E [as 别名]
def __createWidgets(self):
        """Create the widgets. """
        if self.__is_verbose: print "INFO: Creating Widgets!"
        
        # create show preview button
        self.preview_button = tk.Button(self, text = "Show Camera Feed",
            command = self.clickStartPreview)
        self.preview_button.grid(row = 1, column = 0, 
            sticky = tk.W + tk.E + tk.N + tk.S)
        
        # create quit button
        self.quit_button = tk.Button(self, text = "Quit",
            command = self.clickQuit)
        self.quit_button.grid(row = 1, column = 1, 
            sticky = tk.W + tk.E + tk.N + tk.S)
    
    # --------------------------------------------------------------------------
    #   Load Image
    # -------------------------------------------------------------------------- 
开发者ID:Humpheh,项目名称:PiPark,代码行数:21,代码来源:main.py

示例2: build

# 需要导入模块: import Tkinter [as 别名]
# 或者: from Tkinter import E [as 别名]
def build(self, property_dict):
        for c in self.interior.winfo_children():
            c.destroy()


        # Filter property dict
        property_dict = {k: v for k, v in property_dict.items()
                         if self._key_filter_function(k)}

        # Prettify key/value pairs for display
        property_dict = {self._make_key_pretty(k): self._make_value_pretty(v)
                            for k, v in property_dict.items()}

        # Sort by key and filter
        dict_values = sorted(property_dict.items(), key=lambda x: x[0])

        for n,(k,v) in enumerate(dict_values):
            tk.Label(self.interior, text=k, borderwidth=1, relief=tk.SOLID,
                wraplength=75, anchor=tk.E, justify=tk.RIGHT).grid(
                row=n, column=0, sticky='nesw', padx=1, pady=1, ipadx=1)
            tk.Label(self.interior, text=v, borderwidth=1,
                wraplength=125, anchor=tk.W, justify=tk.LEFT).grid(
                row=n, column=1, sticky='nesw', padx=1, pady=1, ipadx=1) 
开发者ID:jsexauer,项目名称:networkx_viewer,代码行数:25,代码来源:viewer.py

示例3: configure_canvas

# 需要导入模块: import Tkinter [as 别名]
# 或者: from Tkinter import E [as 别名]
def configure_canvas(self):
        self.figure = Figure(dpi=100)
        self.canvas = FigureCanvasTkAgg(self.figure, master=self)
        self.axis = self.figure.add_subplot(111)
        self.canvas.draw()
        canvas_widget = self.canvas.get_tk_widget()
        canvas_widget.grid(row=0, column=0, sticky=tk.N + tk.W + tk.E + tk.S)
        self.canvas_cursor = Cursor(self.axis, tk.StringVar(master=self.root))
        self.canvas.mpl_connect('motion_notify_event', self.canvas_cursor.mouse_move)
        self.span = SpanSelector(
            self.axis, self.zoom, 'horizontal', useblit=True,
            rectprops=dict(alpha=0.5, facecolor='red'))
        self.mz_span = None
        self.scan = None
        self.annotations = []
        self.canvas.draw() 
开发者ID:mobiusklein,项目名称:ms_deisotope,代码行数:18,代码来源:view.py

示例4: configure_treeview

# 需要导入模块: import Tkinter [as 别名]
# 或者: from Tkinter import E [as 别名]
def configure_treeview(self):
        self.treeview = ttk.Treeview(self)
        self.treeview['columns'] = ["id", "time", 'ms_level', 'precursor_mz', 'precursor_charge', 'activation']
        self.treeview.grid(row=2, column=0, sticky=tk.S + tk.W + tk.E + tk.N)

        self.treeview_scrollbar = ttk.Scrollbar(self, orient="vertical", command=self.treeview.yview)
        self.treeview_scrollbar.grid(row=2, column=0, sticky=tk.S + tk.E + tk.N)
        self.treeview.configure(yscrollcommand=self.treeview_scrollbar.set)

        self.treeview.heading('id', text="Scan ID")
        self.treeview.heading('#0', text='Index')
        self.treeview.heading("time", text='Time (min)')
        self.treeview.heading("ms_level", text='MS Level')
        self.treeview.heading("precursor_mz", text='Precursor M/Z')
        self.treeview.heading("precursor_charge", text='Precursor Z')
        self.treeview.heading("activation", text='Activation')
        self.treeview.column("#0", width=75)
        self.treeview.column("ms_level", width=75)
        self.treeview.column("time", width=75)
        self.treeview.column("precursor_mz", width=100)
        self.treeview.column("precursor_charge", width=100)
        self.treeview.bind("<<TreeviewSelect>>", self.on_row_click) 
开发者ID:mobiusklein,项目名称:ms_deisotope,代码行数:24,代码来源:view.py

示例5: copy_colup_func

# 需要导入模块: import Tkinter [as 别名]
# 或者: from Tkinter import E [as 别名]
def copy_colup_func(self, *args):
            
            na = self.column_up_inputs[0][0].get()
            h = self.column_up_inputs[0][2].get()
            E = self.column_up_inputs[0][3].get()
            I = self.column_up_inputs[0][4].get()
            A = self.column_up_inputs[0][5].get()
            fix = self.column_up_inputs[0][6].get()
            hinge = self.column_up_inputs[0][7].get()
            
            for i, col in enumerate(self.column_up_inputs):
                col[0].set(na)
                col[2].set(h)
                col[3].set(E)
                col[4].set(I)
                col[5].set(A)
                col[6].set(fix)
                col[7].set(hinge) 
开发者ID:buddyd16,项目名称:Structural-Engineering,代码行数:20,代码来源:Frame_2D_GUI_metric.py

示例6: copy_coldwn_func

# 需要导入模块: import Tkinter [as 别名]
# 或者: from Tkinter import E [as 别名]
def copy_coldwn_func(self, *args):
    
            h = self.column_down_inputs[0][1].get()
            E = self.column_down_inputs[0][2].get()
            I = self.column_down_inputs[0][3].get()
            A = self.column_down_inputs[0][4].get()
            fix = self.column_down_inputs[0][5].get()
            hinge = self.column_down_inputs[0][6].get()
            
            for i, col in enumerate(self.column_down_inputs):
                col[1].set(h)
                col[2].set(E)
                col[3].set(I)
                col[4].set(A)
                col[5].set(fix)
                col[6].set(hinge) 
开发者ID:buddyd16,项目名称:Structural-Engineering,代码行数:18,代码来源:Frame_2D_GUI_metric.py

示例7: __init__

# 需要导入模块: import Tkinter [as 别名]
# 或者: from Tkinter import E [as 别名]
def __init__(self, master=None, cnf=None, **kwargs):
        self.frame = ttk.Frame(master)
        self.frame.grid_rowconfigure(0, weight=1)
        self.frame.grid_columnconfigure(0, weight=1)
        self.xbar = AutoScrollbar(self.frame, orient=tkinter.HORIZONTAL)
        self.xbar.grid(row=1, column=0,
                       sticky=tkinter.E + tkinter.W)
        self.ybar = AutoScrollbar(self.frame)
        self.ybar.grid(row=0, column=1,
                       sticky=tkinter.S + tkinter.N)
        tkinter.Canvas.__init__(self, self.frame, cnf or {},
                                xscrollcommand=self.xbar.set,
                                yscrollcommand=self.ybar.set,
                                **kwargs)
        tkinter.Canvas.grid(self, row=0, column=0,
                            sticky=tkinter.E + tkinter.W + tkinter.N + tkinter.S)
        self.xbar.config(command=self.xview)
        self.ybar.config(command=self.yview)
        self.bind("<MouseWheel>", self.on_mousewheel) 
开发者ID:felipeochoa,项目名称:minecart,代码行数:21,代码来源:viewer.py

示例8: extract_font_stream

# 需要导入模块: import Tkinter [as 别名]
# 或者: from Tkinter import E [as 别名]
def extract_font_stream(font_dict, file_names):
    """
    Try to extract the embedded font program data from a font_dict.

    Returns (stream, data) or (None, None) if there is no embedded font.

    file_names is a sequence of keys to try looking in under the font
    descriptor. (E.g., ('/FontFile2', '/FontFile3') for TrueType fonts)

    """
    desc = pdfminer.pdftypes.resolve1(font_dict['FontDescriptor'])
    for name in file_names:
        try:
            stream = desc[name]
        except KeyError:
            pass
        else:
            stream = pdfminer.pdftypes.resolve1(stream)
            return stream, stream.get_data()
    return None, None 
开发者ID:felipeochoa,项目名称:minecart,代码行数:22,代码来源:viewer.py

示例9: add_measurements

# 需要导入模块: import Tkinter [as 别名]
# 或者: from Tkinter import E [as 别名]
def add_measurements(self, master):

        self.timeStepInSeconds = self.addEntry(master, "Time Step In Seconds:", validation.ValidatePositiveInteger(master), self.config.timeStepInSeconds)
        self.badData = self.addEntry(master, "Bad Data Value:", validation.ValidateFloat(master), self.config.badData)

        self.dateFormat = self.addEntry(master, "Date Format:", validation.ValidateNotBlank(master), self.config.dateFormat, width = 60)
        pickDateFormatButton = tk.Button(master, text=".", command = base_dialog.DateFormatPicker(self, self.dateFormat, ['%Y-%m-%d %H:%M:%S', '%Y-%m-%dT%H:%M:%S', '%d-%m-%y %H:%M', '%y-%m-%d %H:%M', '%d/%m/%Y %H:%M', '%d/%m/%Y %H:%M:%S', '%d/%m/%y %H:%M', '%y/%m/%d %H:%M']), width=5, height=1)
        pickDateFormatButton.grid(row=(self.row-1), sticky=tk.E+tk.N, column=self.buttonColumn)              

        self.timeStamp = self.addPickerEntry(master, "Time Stamp:", validation.ValidateNotBlank(master), self.config.timeStamp, width = 60) 
        self.turbineLocationWindSpeed = self.addPickerEntry(master, "Turbine Location Wind Speed:", None, self.config.turbineLocationWindSpeed, width = 60) #Should this be with reference wind speed?
        self.hubWindSpeed = self.addPickerEntry(master, "Hub Wind Speed:", None, self.config.hubWindSpeed, width = 60)
        self.hubTurbulence = self.addPickerEntry(master, "Hub Turbulence:", None, self.config.hubTurbulence, width = 60)
        self.temperature = self.addPickerEntry(master, "Temperature:", None, self.config.temperature, width = 60)
        self.pressure = self.addPickerEntry(master, "Pressure:", None, self.config.pressure, width = 60)
        self.density = self.addPickerEntry(master, "Density:", None, self.config.density, width = 60)
        self.inflowAngle = self.addPickerEntry(master, "Inflow Angle:", None, self.config.inflowAngle, width = 60)
        self.inflowAngle.setTip('Not required') 
开发者ID:PCWG,项目名称:PCWG,代码行数:20,代码来源:dataset.py

示例10: addpagerow

# 需要导入模块: import Tkinter [as 别名]
# 或者: from Tkinter import E [as 别名]
def addpagerow(self, parent, content, align=None):
        for i in range(len(content)):
            label = nb.Label(parent, text=content[i])
            if i == 0:
                label.grid(padx=10, sticky=tk.W)
                row = parent.grid_size()[1]-1
            elif align is None and i == len(content) - 1:	# Assumes last column right justified if unspecified
                label.grid(row=row, column=i, padx=10, sticky=tk.E)
            else:
                label.grid(row=row, column=i, padx=10, sticky=align or tk.W) 
开发者ID:EDCD,项目名称:EDMarketConnector,代码行数:12,代码来源:stats.py

示例11: do_layout

# 需要导入模块: import Tkinter [as 别名]
# 或者: from Tkinter import E [as 别名]
def do_layout(self):
        self.grid(sticky=tk.N + tk.W + tk.E + tk.S)
        tk.Grid.rowconfigure(self, 0, weight=1)
        tk.Grid.columnconfigure(self, 0, weight=1) 
开发者ID:mobiusklein,项目名称:ms_deisotope,代码行数:6,代码来源:view.py

示例12: setup_static_features

# 需要导入模块: import Tkinter [as 别名]
# 或者: from Tkinter import E [as 别名]
def setup_static_features(self):
        self.wm_title("SVPV - Structural Variant Prediction Viewer")
        self.window_size()

        if self.buttons_1:
            self.buttons_1.destroy()
        self.buttons_1 = tk.LabelFrame(self)
        if self.reset:
            self.reset.destroy()
        self.reset = tk.Button(self.buttons_1, text="Reset Filters", command=self.reset_filters)
        self.reset.grid(row=0, column=0, padx=40, sticky=tk.W)
        if self.list:
            self.list.destroy()
        self.list = tk.Button(self.buttons_1, text="Apply Filters", command=self.apply_filters)
        self.list.grid(row=0, column=1, padx=40, sticky=tk.E)
        self.buttons_1.grid(row=4, column=0, columnspan=2, sticky=tk.EW, padx=10)

        if self.buttons_2:
            self.buttons_2.destroy()
        self.buttons_2 = tk.LabelFrame(self)
        if self.viewGTs:
            self.viewGTs.destroy()
        self.viewGTs = tk.Button(self.buttons_2, text="Get Genotypes", command=self.view_gts)
        self.viewGTs.grid(row=0, column=0, padx=25, sticky=tk.W)
        if self.viewSV:
            self.viewSV.destroy()
        self.viewSV = tk.Button(self.buttons_2, text="Plot Selected SV", command=self.plot_sv)
        self.viewSV.grid(row=0, column=1, padx=25, sticky=tk.W)
        if self.plotAll:
            self.plotAll.destroy()
        self.plotAll = tk.Button(self.buttons_2, text="Plot All SVs", command=self.plot_all)
        self.plotAll.grid(row=0, column=2, padx=25, sticky=tk.E)
        if self.display_cb:
            self.display_cb.destroy()
        self.display_var = tk.IntVar(value=1)
        self.display_cb = tk.Checkbutton(self.buttons_2, text='display plot on creation', variable=self.display_var,
                                         onvalue=1, offvalue=0)
        self.display_cb.grid(row=1, column=1, padx=25, sticky=tk.E)
        self.buttons_2.grid(row=6, column=0, columnspan=2, sticky=tk.EW, padx=10) 
开发者ID:VCCRI,项目名称:SVPV,代码行数:41,代码来源:gui.py

示例13: strap_design_frame_builder

# 需要导入模块: import Tkinter [as 别名]
# 或者: from Tkinter import E [as 别名]
def strap_design_frame_builder(self):
        self.strap_inputs_frame = tk.Frame(self.strap_design_frame)
        self.strap_inputs_frame.pack(side=tk.LEFT, anchor='nw')
        self.strap_calc_frame = tk.Frame(self.strap_design_frame)
        self.strap_calc_frame.pack(side=tk.RIGHT ,anchor='ne', fill=tk.BOTH, expand=1)


        tk.Label(self.strap_inputs_frame, text="B = ", font=self.helv).grid(row=0, column=0, sticky = tk.E)
        tk.Entry(self.strap_inputs_frame, textvariable=self.bs, width=10, validate="key", validatecommand=self.reset_status).grid(row=0, column=1)
        tk.Label(self.strap_inputs_frame, text="in", font=self.helv).grid(row=0, column=2)

        tk.Label(self.strap_inputs_frame, text="H = ", font=self.helv).grid(row=1, column=0, sticky = tk.E)
        tk.Entry(self.strap_inputs_frame, textvariable=self.hs, width=10, validate="key", validatecommand=self.reset_status).grid(row=1, column=1)
        tk.Label(self.strap_inputs_frame, text="in", font=self.helv).grid(row=1, column=2)

        self.strap_vbar_size = tk.StringVar()
        self.inputs.append(self.strap_vbar_size)
        self.strap_vbar_size.set('3')
        self.strap_vbar_size_label = tk.Label(self.strap_inputs_frame, text="Shear\nBar Size (#) : ", font=self.helv)
        self.strap_vbar_size_label.grid(row=2,column=0, pady=2)
        self.strap_vbar_size_menu = tk.OptionMenu(self.strap_inputs_frame, self.strap_vbar_size, '3', '4', '5', command=self.reset_status)
        self.strap_vbar_size_menu.config(font=self.helv)
        self.strap_vbar_size_menu.grid(row=2, column=1, padx= 2, sticky=tk.W)

        self.strap_bar_size = tk.StringVar()
        self.inputs.append(self.strap_bar_size)
        self.strap_bar_size.set('3')
        self.strap_bar_size_label = tk.Label(self.strap_inputs_frame, text="Flexure\nBar Size (#) : ", font=self.helv)
        self.strap_bar_size_label.grid(row=4,column=0, pady=2)
        self.strap_bar_size_menu = tk.OptionMenu(self.strap_inputs_frame, self.strap_bar_size, '3', '4', '5','6','7','8','9','10','11','14','18', command=self.reset_status)
        self.strap_bar_size_menu.config(font=self.helv)
        self.strap_bar_size_menu.grid(row=4, column=1, padx= 2, sticky=tk.W)

        self.strap_calc_txtbox = tk.Text(self.strap_calc_frame, height = 25, width = 70, bg= "grey90", font= self.helv_norm, wrap=tk.WORD)
        self.strap_calc_txtbox.grid(row=0, column=0, sticky='nsew')

        self.strap_scroll = tk.Scrollbar(self.strap_calc_frame, command=self.strap_calc_txtbox.yview)
        self.strap_scroll.grid(row=0, column=1, sticky='nsew')
        self.strap_calc_txtbox['yscrollcommand'] = self.strap_scroll.set 
开发者ID:buddyd16,项目名称:Structural-Engineering,代码行数:41,代码来源:strap_beam_gui.py

示例14: copy_beam_func

# 需要导入模块: import Tkinter [as 别名]
# 或者: from Tkinter import E [as 别名]
def copy_beam_func(self, *args):
        
        l = self.beam_inputs[0][1].get()
        E = self.beam_inputs[0][2].get()
        I = self.beam_inputs[0][3].get()
        
        for i, bm in enumerate(self.beam_inputs):
            bm[1].set(l)
            bm[2].set(E)
            bm[3].set(I) 
开发者ID:buddyd16,项目名称:Structural-Engineering,代码行数:12,代码来源:Frame_2D_GUI_metric.py

示例15: __run__

# 需要导入模块: import Tkinter [as 别名]
# 或者: from Tkinter import E [as 别名]
def __run__(self):
        # create the welcome window
        run_type = None
        t = tkinter.Toplevel(self.root)
        t.resizable(False,False)
        frame = ttk.Frame(t, padding="3 3 12 12")
        frame.grid(column=0, row=0, sticky=(tkinter.N, tkinter.W, tkinter.E, tkinter.S))
        frame.columnconfigure(0, weight=1)
        frame.rowconfigure(0, weight=1)
        ttk.Label(frame,text="Welcome to Marmot.").grid(column=1,row=1)
        def setup(require_gold_standard):
            # this will determine the whole run mode from here on in
            self.require_gold_standard = require_gold_standard
            self.subjects = self.__image_select__(require_gold_standard)
            # if r == "a":
            #     self.subjects = self.project.__get_retired_subjects__(1,True)
            #     self.run_mode = "a"
            # else:
            #     # when we want to explore subjects which don't have gold standard
            #     # basically creating some as we go
            #     # False => read in all subjects, not just those with gold standard annotations
            #     # todo - takes a while in read in all subjects. Better way?
            #     self.subjects = self.project.__get_retired_subjects__(1,False)
            #     self.run_mode = "b"
            random.shuffle(self.subjects)

            self.__thumbnail_display__()
            self.__add_buttons__()

            t.destroy()

        ttk.Button(frame, text="Explore results using existing expert annotations", command = lambda : setup(True)).grid(column=1, row=2)
        ttk.Button(frame, text="Explore and create gold standard on the fly", command = lambda : setup(False)).grid(column=1, row=3)

        t.lift(self.root)

        # self.outputButtons()
        self.root.mainloop() 
开发者ID:zooniverse,项目名称:aggregation,代码行数:40,代码来源:marmot.py


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