python del(pythonlistbox控件用法详解)
python如何做一个展示隐藏文件的小工具:pyhton中能使用的都是对象对象实例化 展示最终结果代码如下:from tkinter import*import os# # 创建对象app=Tk()#添加标签label = Label(text=‘alll hidden files‘,font=(‘Hack‘,25,‘bold‘))label.pack()#展示控件#填充两边,扩展到底#listb
python如何做一个展示隐藏文件的小工具:pyhton中能使用的都是对象对象实例化 展示最终结果代码如下:from tkinter import*import os# # 创建对象app=Tk()#添加标签label = Label(text='alll hidden files',font=('Hack',25,'bold'))label.pack()#展示控件#填充两边,扩展到底#listbox = Listbox(height=5)#添加前景色fg 和背景色bg#listbox = Listbox(bg='#f2f2f2',fq='red')# listbox = Listbox(he
python如何做一个展示隐藏文件的小工具: pyhton中能使用的都是对象 对象实例化 展示最终结果 代码如下: from tkinter import*
import os
# # 创建对象
app=Tk()
#添加标签
label = Label(text='alll hidden files',font=('Hack',25,'bold'))
label.pack()
#展示控件
#填充两边,扩展到底
#listbox = Listbox(height=5)
#添加前景色fg 和背景色bg
#listbox = Listbox(bg='#f2f2f2',fq='red')
# listbox = Listbox(height=5)
listbox = Listbox(bg='#f2f2f2',fg='red')
listbox.pack(fill=BOTH,expand=True)
path ='C:/Users/Administrator/Desktop/python_tuxi'
files = os.listdir(path)
for file in files:
#print(file)
if file.startswith('.'):
listbox.insert(END,file)
#app运行方法
app.mainloop()