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


Python tkinter.BOTTOM属性代码示例

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


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

示例1: __init__

# 需要导入模块: import tkinter [as 别名]
# 或者: from tkinter import BOTTOM [as 别名]
def __init__(self):
        super().__init__()
        self.title("Blackjack")
        self.geometry("800x640")
        self.resizable(False, False)

        self.bottom_frame = tk.Frame(self, width=800, height=140, bg="red")
        self.bottom_frame.pack_propagate(0)

        self.hit_button = tk.Button(self.bottom_frame, text="Hit", width=25, command=self.hit)
        self.stick_button = tk.Button(self.bottom_frame, text="Stick", width=25, command=self.stick)

        self.next_round_button = tk.Button(self.bottom_frame, text="Next Round", width=25, command=self.next_round)
        self.quit_button = tk.Button(self.bottom_frame, text="Quit", width=25, command=self.destroy)

        self.new_game_button = tk.Button(self.bottom_frame, text="New Game", width=25, command=self.new_game)

        self.bottom_frame.pack(side=tk.BOTTOM, fill=tk.X)

        self.game_screen = GameScreen(self, bg="white", width=800, height=500)
        self.game_screen.pack(side=tk.LEFT, anchor=tk.N)
        self.game_screen.setup_opening_animation() 
开发者ID:PacktPublishing,项目名称:Tkinter-GUI-Programming-by-Example,代码行数:24,代码来源:ch4.py

示例2: __init__

# 需要导入模块: import tkinter [as 别名]
# 或者: from tkinter import BOTTOM [as 别名]
def __init__(self, parent, **kwargs):
        tk.Frame.__init__(self, parent, **kwargs)
        
        self.parent = parent
        self.degree = 5
        
        self.graphFigure = Figure(figsize=(4,2), dpi=100, facecolor="black")
        
        self.subplot = self.graphFigure.add_subplot(1,1,1, facecolor=(0.3, 0.3, 0.3))
        self.subplot.tick_params(axis="y", colors="grey", direction="in")
        self.subplot.tick_params(axis="x", colors="grey", labelbottom="off", bottom="off")
        
        self.graphFigure.axes[0].get_xaxis().set_ticklabels([])
        self.graphFigure.subplots_adjust(left=(30/100), bottom=(15/100), 
                                         right=1, top=(1-15/100), wspace=0, hspace=0)

        self.canvas = FigureCanvasTkAgg(self.graphFigure, self)
        self.canvas.get_tk_widget().configure(bg="black")
        self.canvas.get_tk_widget().pack(side=tk.BOTTOM, fill=tk.BOTH, expand=True)
        
        self.canvas.show() 
开发者ID:ArtificialQualia,项目名称:PyEveLiveDPS,代码行数:23,代码来源:graph.py

示例3: switch_response_log

# 需要导入模块: import tkinter [as 别名]
# 或者: from tkinter import BOTTOM [as 别名]
def switch_response_log(*a):
    _select = nb.select()
    setting = nb_names[_select]['setting']
    if setting.get('type') in ['response','code','js','scrapy','selenium']:
        temp_fr2 = setting.get('fr_temp2')
        try:
            temp_fr2.pack_info()
            packed = True
        except:
            packed = False
        if packed:
            temp_fr2.pack_forget()
        else:
            temp_fr2.pack(fill=tkinter.BOTH,expand=True,side=tkinter.BOTTOM)



# 生成代码的函数 
开发者ID:cilame,项目名称:vrequest,代码行数:20,代码来源:tab.py

示例4: _init_toolbar

# 需要导入模块: import tkinter [as 别名]
# 或者: from tkinter import BOTTOM [as 别名]
def _init_toolbar(self):
        xmin, xmax = self.canvas.figure.bbox.intervalx
        height, width = 50, xmax-xmin
        tk.Frame.__init__(self, master=self.window,
                          width=int(width), height=int(height),
                          borderwidth=2)

        self.update()  # Make axes menu

        for text, tooltip_text, image_file, callback in self.toolitems:
            if text is None:
                # Add a spacer; return value is unused.
                self._Spacer()
            else:
                button = self._Button(text=text, file=image_file,
                                      command=getattr(self, callback))
                if tooltip_text is not None:
                    ToolTip.createToolTip(button, tooltip_text)

        self.message = tk.StringVar(master=self)
        self._message_label = tk.Label(master=self, textvariable=self.message)
        self._message_label.pack(side=tk.RIGHT)
        self.pack(side=tk.BOTTOM, fill=tk.X) 
开发者ID:PacktPublishing,项目名称:Mastering-Elasticsearch-7.0,代码行数:25,代码来源:_backend_tk.py

示例5: _init_toolbar

# 需要导入模块: import tkinter [as 别名]
# 或者: from tkinter import BOTTOM [as 别名]
def _init_toolbar(self):
        xmin, xmax = self.canvas.figure.bbox.intervalx
        height, width = 50, xmax-xmin
        Tk.Frame.__init__(self, master=self.window,
                          width=int(width), height=int(height),
                          borderwidth=2)

        self.update()  # Make axes menu

        for text, tooltip_text, image_file, callback in self.toolitems:
            if text is None:
                # Add a spacer; return value is unused.
                self._Spacer()
            else:
                button = self._Button(text=text, file=image_file,
                                      command=getattr(self, callback))
                if tooltip_text is not None:
                    ToolTip.createToolTip(button, tooltip_text)

        self.message = Tk.StringVar(master=self)
        self._message_label = Tk.Label(master=self, textvariable=self.message)
        self._message_label.pack(side=Tk.RIGHT)
        self.pack(side=Tk.BOTTOM, fill=Tk.X) 
开发者ID:Relph1119,项目名称:GraphicDesignPatternByPython,代码行数:25,代码来源:_backend_tk.py

示例6: opts_buttons

# 需要导入模块: import tkinter [as 别名]
# 或者: from tkinter import BOTTOM [as 别名]
def opts_buttons(self, frame):
        """ Add the option buttons """
        logger.debug("Building Buttons")
        btnframe = ttk.Frame(frame)
        btnframe.pack(fill=tk.X, pady=5, padx=5, side=tk.BOTTOM)

        lblstatus = ttk.Label(btnframe,
                              width=40,
                              textvariable=self.vars["status"],
                              anchor=tk.W)
        lblstatus.pack(side=tk.LEFT, anchor=tk.W, fill=tk.X, expand=True)

        for btntype in ("reload", "save"):
            cmd = getattr(self, "optbtn_{}".format(btntype))
            btn = ttk.Button(btnframe,
                             image=get_images().icons[btntype],
                             command=cmd)
            btn.pack(padx=2, side=tk.RIGHT)
            hlp = self.set_help(btntype)
            Tooltip(btn, text=hlp, wraplength=200)
        logger.debug("Built Buttons") 
开发者ID:deepfakes,项目名称:faceswap,代码行数:23,代码来源:display_analysis.py

示例7: create_advance

# 需要导入模块: import tkinter [as 别名]
# 或者: from tkinter import BOTTOM [as 别名]
def create_advance(self):
        '''
        高级菜单
        '''
        advance = tk.LabelFrame(self.main_frame1, text='高级选项')
        advance.pack(padx=5, pady=5, fill=tk.X, side=tk.BOTTOM)
        tk.Checkbutton(advance, text='调试模式',
                       variable=self.debug_enable).pack(anchor=tk.W)
        tk.Checkbutton(advance, text='超时自动关闭阴阳师',
                       variable=self.watchdog_enable).pack(anchor=tk.W)
        frame = tk.Frame(advance)
        frame.pack(anchor=tk.W)
        tk.Label(frame, text='  画面超时时间(秒):').grid(row=0, column=0)
        tk.Entry(frame, textvariable=self.max_win_time,
                 width=5).grid(row=0, column=1)
        tk.Label(frame, text='  操作超时时间(秒):').grid(row=1, column=0)
        tk.Entry(frame, textvariable=self.max_op_time,
                 width=5).grid(row=1, column=1) 
开发者ID:AcademicDog,项目名称:onmyoji_bot,代码行数:20,代码来源:tkui.py

示例8: view_init

# 需要导入模块: import tkinter [as 别名]
# 或者: from tkinter import BOTTOM [as 别名]
def view_init(self):
        self.frame = tk.LabelFrame(self.browser.workframe, text=" Image ")
        self.frame.pack(side=tk.LEFT, fill=tk.BOTH, expand=True, padx=7, pady=7)
        self.figure = plt.figure(figsize=(8, 12), dpi=70)
        self.ax1 = plt.subplot2grid((50,40), (0, 0), rowspan=40, colspan=40)
        self.ax2 = plt.subplot2grid((50,40), (42, 0), rowspan=8, colspan=40, sharex=self.ax1)
        plt.subplots_adjust(left=0.1, bottom=0.05, right=0.95, top=0.97, wspace=0.2, hspace=0.2)
        self.view_plot_image()
        self.canvas = FigureCanvasTkAgg(self.figure, self.frame)

        if self.mpltlib3:
            self.canvas.draw()
            toolbar = NavigationToolbar2Tk(self.canvas, self.frame).update()
        else:
            self.canvas.show()
            toolbar = NavigationToolbar2TkAgg(self.canvas, self.frame).update()

        self.canvas.get_tk_widget().pack(side=tk.BOTTOM, fill=tk.BOTH, expand=True)

        self.canvas._tkcanvas.pack(side=tk.TOP, fill=tk.BOTH, padx=2, pady=2, expand=True)
        self.frame.pack(side=tk.LEFT, fill=tk.BOTH, expand=True, padx=7, pady=7) 
开发者ID:aizquier,项目名称:voyagerimb,代码行数:23,代码来源:voyagerimb.py

示例9: __init__

# 需要导入模块: import tkinter [as 别名]
# 或者: from tkinter import BOTTOM [as 别名]
def __init__(self, conn):
        super().__init__()
        self.title("SQLite Contacts list")
        self.conn = conn
        self.selection = None
        self.list = ContactList(self, height=15)
        self.form = UpdateContactForm(self)
        self.btn_new = tk.Button(self, text="Add new contact",
                                 command=self.add_contact)
        self.contacts = self.load_contacts()

        for contact in self.contacts:
            self.list.insert(contact)
        self.list.pack(side=tk.LEFT, padx=10, pady=10)
        self.form.pack(padx=10, pady=10)
        self.btn_new.pack(side=tk.BOTTOM, pady=5)

        self.list.bind_doble_click(self.show_contact)
        self.form.bind_save(self.update_contact)
        self.form.bind_delete(self.delete_contact) 
开发者ID:PacktPublishing,项目名称:Tkinter-GUI-Application-Development-Cookbook,代码行数:22,代码来源:chapter5_04.py

示例10: __init__

# 需要导入模块: import tkinter [as 别名]
# 或者: from tkinter import BOTTOM [as 别名]
def __init__(self):
        super().__init__()
        self.title("Blackjack")
        self.geometry("800x640")
        self.resizable(False, False)

        self.CARD_ORIGINAL_POSITION = 100
        self.CARD_WIDTH_OFFSET = 100

        self.PLAYER_CARD_HEIGHT = 300
        self.DEALER_CARD_HEIGHT = 100

        self.PLAYER_SCORE_TEXT_COORDS = (400, 450)
        self.WINNER_TEXT_COORDS = (400, 250)

        self.game_state = GameState()

        self.game_screen = tk.Canvas(self, bg="white", width=800, height=500)

        self.bottom_frame = tk.Frame(self, width=800, height=140, bg="red")
        self.bottom_frame.pack_propagate(0)

        self.hit_button = tk.Button(self.bottom_frame, text="Hit", width=25, command=self.hit)
        self.stick_button = tk.Button(self.bottom_frame, text="Stick", width=25, command=self.stick)

        self.play_again_button = tk.Button(self.bottom_frame, text="Play Again", width=25, command=self.play_again)
        self.quit_button = tk.Button(self.bottom_frame, text="Quit", width=25, command=self.destroy)

        self.hit_button.pack(side=tk.LEFT, padx=(100, 200))
        self.stick_button.pack(side=tk.LEFT)

        self.bottom_frame.pack(side=tk.BOTTOM, fill=tk.X)
        self.game_screen.pack(side=tk.LEFT, anchor=tk.N)

        self.display_table() 
开发者ID:PacktPublishing,项目名称:Tkinter-GUI-Programming-by-Example,代码行数:37,代码来源:ch3.py

示例11: __init__

# 需要导入模块: import tkinter [as 别名]
# 或者: from tkinter import BOTTOM [as 别名]
def __init__(self, master, **kwargs):
        super().__init__(**kwargs)
        self.master = master

        self.transient(self.master)
        self.geometry('500x250')
        self.title('Choose font and size')

        self.configure(bg=self.master.background)

        self.font_list = tk.Listbox(self, exportselection=False)

        self.available_fonts = sorted(families())

        for family in self.available_fonts:
            self.font_list.insert(tk.END, family)

        current_selection_index = self.available_fonts.index(self.master.font_family)
        if current_selection_index:
            self.font_list.select_set(current_selection_index)
            self.font_list.see(current_selection_index)

        self.size_input = tk.Spinbox(self, from_=0, to=99, value=self.master.font_size)

        self.save_button = ttk.Button(self, text="Save", style="editor.TButton", command=self.save)

        self.save_button.pack(side=tk.BOTTOM, fill=tk.X, expand=1, padx=40)
        self.font_list.pack(side=tk.LEFT, fill=tk.Y, expand=1)
        self.size_input.pack(side=tk.BOTTOM, fill=tk.X, expand=1) 
开发者ID:PacktPublishing,项目名称:Tkinter-GUI-Programming-by-Example,代码行数:31,代码来源:fontchooser.py

示例12: create_statusbar

# 需要导入模块: import tkinter [as 别名]
# 或者: from tkinter import BOTTOM [as 别名]
def create_statusbar(self):
        statusBar = ttk.Frame(self.master)
        statusLabel = ttk.Label(statusBar, textvariable=self.statusText)
        statusLabel.grid(column=0, row=0, sticky=(tk.W, tk.E))
        scoreLabel = ttk.Label(statusBar, textvariable=self.scoreText,
                relief=tk.SUNKEN)
        scoreLabel.grid(column=1, row=0)
        statusBar.columnconfigure(0, weight=1)
        statusBar.pack(side=tk.BOTTOM, fill=tk.X)
        self.set_status_text("Click a tile or click File→New for a new "
                "game") 
开发者ID:lovexiaov,项目名称:python-in-practice,代码行数:13,代码来源:Main.py

示例13: create_statusbar

# 需要导入模块: import tkinter [as 别名]
# 或者: from tkinter import BOTTOM [as 别名]
def create_statusbar(self):
        statusBar = ttk.Frame(self.master)
        statusLabel = ttk.Label(statusBar, textvariable=self.statusText)
        statusLabel.grid(column=0, row=0, sticky=(tk.W, tk.E))
        scoreLabel = ttk.Label(statusBar, textvariable=self.scoreText,
                relief=tk.SUNKEN)
        scoreLabel.grid(column=1, row=0)
        TkUtil.Tooltip.Tooltip(scoreLabel,
                text="Current score (High score)")
        statusBar.columnconfigure(0, weight=1)
        statusBar.pack(side=tk.BOTTOM, fill=tk.X)
        self.set_status_text("Click a tile or click File→New for a new "
                "game") 
开发者ID:lovexiaov,项目名称:python-in-practice,代码行数:15,代码来源:Main.py

示例14: show_response_log

# 需要导入模块: import tkinter [as 别名]
# 或者: from tkinter import BOTTOM [as 别名]
def show_response_log():
    _select = nb.select()
    setting = nb_names[_select]['setting']
    if setting.get('type') == 'response':
        setting.get('fr_temp2').pack(fill=tkinter.BOTH,expand=True,side=tkinter.BOTTOM)

# 获取内部文本的函数 
开发者ID:cilame,项目名称:vrequest,代码行数:9,代码来源:tab.py

示例15: show_code_log

# 需要导入模块: import tkinter [as 别名]
# 或者: from tkinter import BOTTOM [as 别名]
def show_code_log():
    _select = nb.select()
    setting = nb_names[_select]['setting']
    if setting.get('type') == 'code' or setting.get('type') == 'js' or setting.get('type') == 'scrapy' or setting.get('type') == 'selenium':
        setting.get('fr_temp2').pack(fill=tkinter.BOTH,expand=True,side=tkinter.BOTTOM) 
开发者ID:cilame,项目名称:vrequest,代码行数:7,代码来源:tab.py


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