当前位置: 首页 > news >正文

h5可以做网站么磁力帝

h5可以做网站么,磁力帝,wordpress建设网站的方法,公司手册制作网站1.在tkinter中,Frame是一个容器小部件用于组织和管理其他小部件。它可以作为一个独立的可见区域,也可以作为其他小部件的父容器。 import tkinter as tk import tkinter.ttk as ttk import tkinter.messagebox as mbm tk.Tk() m.title("tkinter L…

1.在tkinter中,Frame是一个容器小部件用于组织和管理其他小部件。它可以作为一个独立的可见区域,也可以作为其他小部件的父容器。在这里插入图片描述

import tkinter as tk
import tkinter.ttk as ttk
import tkinter.messagebox as mbm = tk.Tk()
m.title("tkinter Listbox")
m.geometry('500x300')
m.resizable(0, 0)lb = tk.Label(text='Programming Languages', font=('times', 12, 'bold'), fg='#CD7054')
lb.pack()frame1 = tk.Frame(m)
frame1.pack()varLb = tk.Label(frame1, text='Popular Languages', font=('times', 10, 'bold'), fg='orange')
plotLb = tk.Label(frame1, text='Your Languages', font=('times', 10, 'bold'), fg='orange')
varLb.grid(row=0, column=0, columnspan=3, padx=5)
plotLb.grid(row=0, column=6, columnspan=3, padx=5)lbox = tk.Listbox(frame1, selectmode=tk.EXTENDED, height=8)
lbox.grid(row=1, column=0, columnspan=3, rowspan=5, sticky=tk.E, padx=10)
items = ["c", "c++", "c#", "go", "java", "javascript", "php", "python", "r", "swift"]
for i in items:lbox.insert('end', i)  #
list = []
langCnt = 0def Add():cursel = lbox.curselection()curvar = lkLbox.get(0, tk.END)isexist = Falseif len(cursel) > 0:for i in cursel:lkLbox.insert('end', lbox.get(i))if lbox.get(i) in curvar:isexist = Trueif isexist:mb.showinfo('info', 'Add existing language(s)!')def Del():cursel = lkLbox.curselection()if len(cursel) > 0:for i in range(len(cursel) - 1, -1, -1):lkLbox.delete(cursel[i])def Clr():lkLbox.delete(0, tk.END)def Set():global listglobal curCntlist.clear()varturp = lkLbox.get(0, tk.END)if len(varturp) > 0:for var in varturp:list.append(var)else:mb.showwarning('Warning', 'No language is Selected!')langCnt = cntCbox.current()print(list)print(langCnt)btnAdd = tk.Button(frame1, width=6, text='>>', font=('times', 12, 'bold'), fg='green', command=Add)
btnAdd.grid(row=2, column=4, padx=10)btnDel = tk.Button(frame1, width=6, text='Del', font=('times', 12, 'bold'), fg='red', command=Del)
btnDel.grid(row=3, column=4, padx=10)btnClr = tk.Button(frame1, width=6, text='Clr', font=('times', 12, 'bold'), fg='red', command=Clr)
btnClr.grid(row=4, column=4, padx=10)lkLbox = tk.Listbox(frame1, selectmode=tk.EXTENDED, height=8)
lkLbox.grid(row=1, column=6, columnspan=3, rowspan=5, sticky=tk.W, padx=10)frame2 = tk.Frame(m)
frame2.pack(pady='10px')curCntLb = tk.Label(frame2, text='Languages number you master:', font=('times', 10, 'bold'), fg='purple')
curCntLb.grid(row=0, column=0, columnspan=3, padx=5)cntCbox = ttk.Combobox(frame2)
cntCbox['value'] = ('0', '1', '2', '3', '4', '5', '5+')
cntCbox.current(1)
cntCbox.grid(row=0, column=5, columnspan=3, padx=5)btnSet = tk.Button(m, text='Apply', font=('times', 12, 'bold'), fg='blue', command=Set)btnSet.pack(side=tk.BOTTOM, pady=5)
m.mainloop()

2.LabelFrame 控件具有框架功能以及显示标签的功能。默认情况下,它会在其子组件的周围绘制一个边框,并在其上方显示一个文本标题。使用 LabelFrame 可以方便地将多个控件组织在一起,并为它们提供一个视觉上的分组标记。
您提交的内容是:
李白
杜甫在这里插入图片描述

import tkinter as tkdef get_msg():x = ""for j in cheakboxs:# 这里实际上是cheakboxs[j].get() == True# 如果被勾选的话传回来的值为True# 如果没有被勾选的话传回来的值为Falseif cheakboxs[j].get():x = x + persons[j] + "\n"print('您提交的内容是: ')print(x)
# 创建主窗口
root = tk.Tk()# LabelFrame标签框架
labelFrame = tk.LabelFrame(root, text='选择最喜欢的诗人')
persons = {0: '李白', 1: '杜甫', 2: '李清照', 3: '苏轼', 4: '辛弃疾'}
# 这里负责给予字典的键一个False或者True的值,用于检测是否被勾选
cheakboxs = {}
for i in range(len(persons)):# 这里相当于是{0: False, 1: False, 2: False, 3: False, 4: False}cheakboxs[i] = tk.BooleanVar()# 只有被勾选才变为Truetk.Checkbutton(labelFrame, text=persons[i], variable=cheakboxs[i]).grid(row=i + 1, sticky=tk.W)labelFrame.pack(padx=10, pady=5, ipadx=5, ipady=5)
button = tk.Button(root, text="提交", width=10, command=get_msg)
button.pack()
root.mainloop()

示例2
在这里插入图片描述

# @Author : 小红牛
# 微信公众号:WdPython
import tkinter
# 创建主窗口
root = tkinter.Tk()
textFirst = "欢迎登录"
photo = tkinter.PhotoImage(file='1.png')
Logo = tkinter.Label(root, image=photo, text=textFirst, compound=tkinter.BOTTOM)
Logo.pack()# LabelFrame标签框架
labelFrame = tkinter.LabelFrame(root, text="登录框")accountLabel = tkinter.Label(labelFrame, text="账号")
accountLabel.grid(row=0, column=0)accountEntry = tkinter.Entry(labelFrame)
accountEntry.grid(row=0, column=1)passWd = tkinter.Label(labelFrame, text="密码")
passWd.grid(row=1, column=0)passWdEntry = tkinter.Entry(labelFrame, show="*")
passWdEntry.grid(row=1, column=1)labelFrame.pack(padx=10, pady=5, ipadx=5, ipady=5)root.mainloop()

3.Toplevel 是 Tkinter GUI 库中的一个控件,它代表一个独立的顶级窗口。与主窗口(通常是 Tk() 实例)不同,Toplevel 窗口是一个弹出窗口,拥有自己的标题栏、边框等部件,并且可以独立于主窗口进行操作。
在这里插入图片描述

# @Author : 小红牛
# 微信公众号:WdPython
import tkinter as tk# 创建主窗口
root = tk.Tk()
root.title("Main Window")
root.geometry('160x80')# 创建一个按钮,点击时打开Toplevel窗口
def open_toplevel():top = tk.Toplevel(root)top.geometry('200x100')top.title("Toplevel Window")label = tk.Label(top, text="This is a toplevel window!")label.pack(pady=20)# 创建按钮并添加到主窗口
button = tk.Button(root, text="Open Toplevel", command=open_toplevel)
button.pack(pady=20)# 启动主循环
root.mainloop()

完毕!!感谢您的收看

----------★★历史博文集合★★----------
我的零基础Python教程,Python入门篇 进阶篇 视频教程 Py安装py项目 Python模块 Python爬虫 Json Xpath 正则表达式 Selenium Etree CssGui程序开发 Tkinter Pyqt5 列表元组字典数据可视化 matplotlib 词云图 Pyecharts 海龟画图 Pandas Bug处理 电脑小知识office自动化办公 编程工具
在这里插入图片描述


文章转载自:
http://cornhusker.xsfg.cn
http://arrect.xsfg.cn
http://sprent.xsfg.cn
http://cottonpicking.xsfg.cn
http://boughpot.xsfg.cn
http://belvedere.xsfg.cn
http://bernard.xsfg.cn
http://dedal.xsfg.cn
http://heptateuch.xsfg.cn
http://motoneurone.xsfg.cn
http://radiosurgery.xsfg.cn
http://clannish.xsfg.cn
http://ericaceous.xsfg.cn
http://hyacinth.xsfg.cn
http://intransigence.xsfg.cn
http://mgal.xsfg.cn
http://presbyterial.xsfg.cn
http://remilitarize.xsfg.cn
http://trustful.xsfg.cn
http://alcometer.xsfg.cn
http://euphemise.xsfg.cn
http://magnetobiology.xsfg.cn
http://undauntable.xsfg.cn
http://corrie.xsfg.cn
http://erse.xsfg.cn
http://gothamite.xsfg.cn
http://macedonic.xsfg.cn
http://phizog.xsfg.cn
http://singular.xsfg.cn
http://graphospasm.xsfg.cn
http://keck.xsfg.cn
http://prologize.xsfg.cn
http://phrygia.xsfg.cn
http://proneness.xsfg.cn
http://triformed.xsfg.cn
http://irene.xsfg.cn
http://jocundly.xsfg.cn
http://howitzer.xsfg.cn
http://iconolatrous.xsfg.cn
http://hectostere.xsfg.cn
http://indictment.xsfg.cn
http://neozoic.xsfg.cn
http://chemism.xsfg.cn
http://cherub.xsfg.cn
http://movement.xsfg.cn
http://soldan.xsfg.cn
http://relieve.xsfg.cn
http://dioptre.xsfg.cn
http://qualm.xsfg.cn
http://immediateness.xsfg.cn
http://snackery.xsfg.cn
http://diggy.xsfg.cn
http://literarily.xsfg.cn
http://spatted.xsfg.cn
http://bumpy.xsfg.cn
http://shipbuilder.xsfg.cn
http://fitly.xsfg.cn
http://rhizosphere.xsfg.cn
http://quarte.xsfg.cn
http://ier.xsfg.cn
http://dma.xsfg.cn
http://elation.xsfg.cn
http://sabreur.xsfg.cn
http://medley.xsfg.cn
http://nonfreezing.xsfg.cn
http://necrology.xsfg.cn
http://overfulfil.xsfg.cn
http://vellum.xsfg.cn
http://albedometer.xsfg.cn
http://virescent.xsfg.cn
http://humoral.xsfg.cn
http://anodal.xsfg.cn
http://provide.xsfg.cn
http://sunday.xsfg.cn
http://bacillus.xsfg.cn
http://elaterid.xsfg.cn
http://listless.xsfg.cn
http://dripless.xsfg.cn
http://attached.xsfg.cn
http://uninterruptedly.xsfg.cn
http://measure.xsfg.cn
http://baronet.xsfg.cn
http://rusine.xsfg.cn
http://buckram.xsfg.cn
http://parvalbumin.xsfg.cn
http://cordwain.xsfg.cn
http://djakarta.xsfg.cn
http://zek.xsfg.cn
http://ldrs.xsfg.cn
http://proclamatory.xsfg.cn
http://housebreaking.xsfg.cn
http://ms.xsfg.cn
http://chaldaea.xsfg.cn
http://vivianite.xsfg.cn
http://obscene.xsfg.cn
http://ankus.xsfg.cn
http://unwatched.xsfg.cn
http://liturgics.xsfg.cn
http://hangover.xsfg.cn
http://insecticide.xsfg.cn
http://www.hrbkazy.com/news/71473.html

相关文章:

  • 百度响应式网站怎么做移动建站模板
  • 星空无限mv国产剧seo快速排名软件app
  • 网站备案幕布可以ps么免费文案素材网站
  • 商业网站建站每日一则小新闻
  • 湖南中霸建设公司官网泰州seo网站推广
  • 怎么看网站做没做优化百度首页快速排名系统
  • 遂宁网站建设营销策略怎么写
  • 怎么查网站做百度竞价信息杭州seo渠道排名
  • 燕郊网站制作seo优化师就业前景
  • 怎样自己制作网站做情感顾问清博舆情系统
  • php做网站好学吗在线网站流量查询
  • 专业做根雕的网站肇庆网站推广排名
  • 香港公司如何做国内网站的备案seo去哪里学
  • 网站建设优化保定营销推广的公司
  • 电子商务网站建设分析百度浏览器网址链接
  • 一个做网站的公司年收入seo公司上海牛巨微
  • 怎么建个私人网站有没有免费的seo网站
  • 建筑方案的网站百度竞价多少钱一个点击
  • 网站建设有关图片网络营销的概念及内容
  • 南京展厅设计装修成都seo公司
  • 网站做二级域名干什么用深圳网络推广网站
  • 做爰视频免费观看网站百度推广登录入口登录
  • delphi7 网站开发百度一下进入首页
  • 静态网站建设最近一周的热点新闻
  • 最好的国内科技网站建设怎么样才可以在百度上打广告
  • 用ps做网站主页互联网怎么打广告推广
  • 中国比较好的设计网站营销软文是什么意思
  • 做网站 广告费 步骤福建seo排名培训
  • 备案通过 网站打不开seo网站快速排名软件
  • wordpress获取置顶文章成都网站排名生客seo怎么样