话不多说 上代码。 wxml: <view class="page"> 弹出 <view catchtouchmove="preventTouchM...
import tkinter as tk from tkinter import messagebox def show_popup(): # 创建弹出窗口 popup = tk.Toplevel() # 创建标签和文本框 label = tk.Label(popup, text="请输入值:") label.pack() entry = tk.Entry(popup) entry.pack() # 创建确认按钮 button = tk.Button(popup, text="确认", comma...
| | tk_popup(self, x, y, entry='') | Post the menu at position X,Y with entry ENTRY. | | type(self, index) | Return the type of the menu item at INDEX. | | unpost(self) | Unmap a menu. | | xposition(self, index) | Return the x-position of the leftmost pixel of...
state_clipboard = tk.DISABLED self.menu.entryconfig(0, state=state_selection)# Cutself.menu.entryconfig(1, state=state_selection)# Copyself.menu.entryconfig(2, state=state_clipboard)# Pasteself.menu.entryconfig(3, state=state_selection)# Delete 例如,如果没有选择或剪贴板上没有内容,所有条目都...
(popup_window, text="①点击开始使用或左上角的文件导入text文件", font=("Arial", 14))24label.pack()25label = tk.Label(popup_window, text="②开始抽取", font=("Arial", 14))26label.pack()2728#官网29defopen_url():30webbrowser.open("https://www.cnblogs.com/Rick-Sanchez/")3132#清空...
bt = ttk.Button(color_group, text='转换', bootstyle='success') self.en = ttk.Entry(col...
root=tkinter.Tk()# 设置窗口标题root.title('mywindow')# 设置窗口宽与高,初始显示的左上角坐标,单位都是像素pixel# “+x”表示x是窗口左边距离屏幕左边的距离,如果是“-x”,则表示x是窗口右边距离屏幕右边的距离。# “+y”表示y是窗口上边距离屏幕上边的距离,如果是“-y”则表示y是窗口下边距离屏幕下边...
with open(fp, 'w') as fw: conf.write(fw) def show_popup_menu(event): '''显示右键菜单''' popup_menu.tk_popup(event.x_root, event.y_root) if __name__ == '__main__': ## 配置文件路径 fp = Path(d) / 'conf.ini'
self.status.pack_forget() self.status.pack(fill=X) self.editmenu.entryconfig(8,state=NORMAL) else: # 隐藏工具 if self.txt_decoded: self.txt_decoded.pack_forget() if self.hexdata: self.hexdata.pack_forget() self.status.pack(side=RIGHT) self.editmenu.entryconfig(8,state=DISABLED) # ...
windows_popup.py new commit Aug 17, 2023 wip.html new commit Aug 9, 2023 Repository files navigation README tkinter_tutorial Colorpycker Choose your color with tkinter and some scale widgets. tkinter_pygame Open 2 tkinter windows from a window of pygame ...