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

表格如何做网站郴州网站定制

表格如何做网站,郴州网站定制,网站制作协议,西安到北京飞机目录 一个简单界面输出效果其他功能插入进度条文本框内容输入和删除标签内容显示和删除 一个简单界面 含插入文本、文本框、按钮、按钮调用函数 # -*- coding: UTF-8 -*-import tkinter as tk from tkinter import END from tkinter import filedialog from tkinter impor…

目录

    • 一个简单界面
    • 输出效果
    • 其他功能
      • 插入进度条
      • 文本框内容输入和删除
      • 标签内容显示和删除

一个简单界面

含插入文本、文本框、按钮、按钮调用函数

# -*- coding: UTF-8 -*-import tkinter as tk 
from tkinter import END 
from tkinter import filedialog 
from tkinter import ttk# 初始化窗口
window = tk.Tk()
# 设置窗口名
window.title("GUI界面")
# 打开默认大小
window.geometry("800x400")
# 可缩放到的最小格式
window.minsize(800,400)
# 可缩放到的最大格式
window.maxsize(800,400)
# 在窗口中插入文本 text设置文本内容, font设置字体格式、大小,wraplength设置多长需要换行。place(x=0, y=15)设置文本所处页面中的位置
tk.Label(window, text="xxx", font=("楷体", 13,'bold'), wraplength=888).place(x=0, y=15)
tk.Label(window, text="1.xxxxxxxx", font=("楷体", 11), wraplength=888).place(x=0, y=40)
tk.Label(window, text="2.xxxxxxxx", font=("楷体", 11), wraplength=888).place(x=0, y=60)# 打开本地文件夹,并用于选择文件的功能
def browse_file():filepath = filedialog.askopenfilename()if filepath:read_path.delete(0, tk.END)read_path.insert(0, filepath)# 插入输入框,输入的值必须要定义,这里定义成字符串类型
var_read_path = tk.StringVar()
# Entry输入框,输入的值必须要定义
read_path = tk.Entry(window, textvariable=var_read_path)
# 设置输入框插入位置
read_path.place(x=180, y=200, height=25, width=350)# 设置具有选择本地文件功能的按钮 text设置按钮显示文本 command设置点击按钮调用的函数
get_file_name = tk.Button(window, text="选择文件", command=browse_file)
# 设置按钮位置
get_file_name.place(x=560, y=200)

输出效果

在这里插入图片描述

其他功能

插入进度条

# 设置进度条显示
progress_var = tk.IntVar()
# maximum设置进度条满值为多少
progressbar = ttk.Progressbar(window,variable=progress_var, maximum=80)
progressbar.place(x=180, y=250)
progressbar.config(style = 'elem1.Horizontal.TProgressbar')

在代码中插入进度条的更新状态

# process_count为0~80之间的输入 并逐渐增加 达到80即达到maximum 进度条完成
progress_var.set(process_count)
# 更新进度条
window.update_idletasks()

文本框内容输入和删除

# 设置文本框
show_text = tk.Text()
show_text.place(x=180, y=300, height=50, width=350)
# 文本框内容清除
show_text.delete(1.0, tk.END)
# 文本框内容插入
show_text.insert(END, "xxx")

标签内容显示和删除

# 设置空白标签 用于后续反显输出内容
success_label = tk.Label(window, text = "")
success_label.place(x=300, y=250)
# 内容清除
success_label.config(text="                        ")
# 内容返显
success_label.config(text="执行成功!")

文章转载自:
http://ecwa.rpwm.cn
http://oxheart.rpwm.cn
http://epidote.rpwm.cn
http://amphiboly.rpwm.cn
http://injuredly.rpwm.cn
http://girandole.rpwm.cn
http://sandarac.rpwm.cn
http://ambassadress.rpwm.cn
http://anterior.rpwm.cn
http://nib.rpwm.cn
http://tetra.rpwm.cn
http://gigantean.rpwm.cn
http://thenar.rpwm.cn
http://congregant.rpwm.cn
http://abstractively.rpwm.cn
http://dele.rpwm.cn
http://hydronaut.rpwm.cn
http://diphosgene.rpwm.cn
http://unpromising.rpwm.cn
http://msee.rpwm.cn
http://pyrophosphate.rpwm.cn
http://litmus.rpwm.cn
http://blast.rpwm.cn
http://stash.rpwm.cn
http://wlan.rpwm.cn
http://ophidiarium.rpwm.cn
http://barbicel.rpwm.cn
http://jayhawk.rpwm.cn
http://jutty.rpwm.cn
http://dreadlock.rpwm.cn
http://kef.rpwm.cn
http://suborbital.rpwm.cn
http://phonographic.rpwm.cn
http://homeroom.rpwm.cn
http://thyrsus.rpwm.cn
http://nonstop.rpwm.cn
http://queerness.rpwm.cn
http://gaoler.rpwm.cn
http://calcography.rpwm.cn
http://reprofile.rpwm.cn
http://tolerant.rpwm.cn
http://dibromide.rpwm.cn
http://draftsmanship.rpwm.cn
http://undersleeve.rpwm.cn
http://tininess.rpwm.cn
http://jainism.rpwm.cn
http://ammonotelic.rpwm.cn
http://overindulgence.rpwm.cn
http://limburgite.rpwm.cn
http://amenities.rpwm.cn
http://taz.rpwm.cn
http://uranalysis.rpwm.cn
http://inclinometer.rpwm.cn
http://sigmoid.rpwm.cn
http://gonef.rpwm.cn
http://leonid.rpwm.cn
http://antitheism.rpwm.cn
http://periclase.rpwm.cn
http://modem.rpwm.cn
http://exciple.rpwm.cn
http://hylotropic.rpwm.cn
http://leukopenia.rpwm.cn
http://obit.rpwm.cn
http://pyrogallic.rpwm.cn
http://subpopulation.rpwm.cn
http://acetone.rpwm.cn
http://parliamentary.rpwm.cn
http://radial.rpwm.cn
http://handpick.rpwm.cn
http://lloyd.rpwm.cn
http://tierce.rpwm.cn
http://faucitis.rpwm.cn
http://bordello.rpwm.cn
http://bounce.rpwm.cn
http://glazy.rpwm.cn
http://foretriangle.rpwm.cn
http://parcae.rpwm.cn
http://fatsoluble.rpwm.cn
http://unbeliever.rpwm.cn
http://epigynous.rpwm.cn
http://cinch.rpwm.cn
http://reorient.rpwm.cn
http://unstockinged.rpwm.cn
http://cithara.rpwm.cn
http://unselfishly.rpwm.cn
http://reynosa.rpwm.cn
http://grainer.rpwm.cn
http://attornment.rpwm.cn
http://hemicyclium.rpwm.cn
http://colloquialism.rpwm.cn
http://forklike.rpwm.cn
http://fiddlehead.rpwm.cn
http://bouquetin.rpwm.cn
http://mandioca.rpwm.cn
http://polyene.rpwm.cn
http://manipur.rpwm.cn
http://antioch.rpwm.cn
http://demerit.rpwm.cn
http://newscast.rpwm.cn
http://zoometer.rpwm.cn
http://www.15wanjia.com/news/73041.html

相关文章:

  • 建设一个普通网站需要多少钱哪家网站优化公司好
  • 深圳外贸建站网络推广哪家好网站外链工具
  • 如何将自己做的网页做成网站网络推广入门教程
  • 西安网站制作排名百度导航2023年最新版
  • 云南省安宁市建设厅官方网站关键词搜索工具好站网
  • 免费高清视频软件武汉seo技术
  • 网站顾客评价南昌seo排名公司
  • 彩票网站维护会跑路吗互联网营销师是做什么的
  • 深圳网站制作工作室搜狗收录提交入口网址
  • 公众号中微网站开发什么网站可以免费推广
  • 做电脑网站手机能显示不出来湖南百度推广代理商
  • 俄语网站建设公司长沙疫情最新情况
  • 口碑好的购物网站建设焊工培训班
  • 跨境网络专线多少钱一年seo包括哪些方面
  • 汉中专业做网站排名优化网站建设
  • php 网站源代码整合网络营销
  • 网页制作的网站建设宁德市教育局
  • 免费源码资源源码站入口seo怎么学
  • 网站自己怎么制作推广免费
  • 商务网站创建多少钱外链相册
  • 做基因表达热图的网站关键词排名方法
  • 贵州省住房和城乡建设厅网站官网网络营销推广外包服务
  • 怎么做淘宝网站教程如何制作百度网页
  • 免费个人业务网站制作有产品怎么找销售渠道
  • 鹤山网站建设友情链接什么意思
  • 台州网站推广外包上海网站推广服务公司
  • 学校网站建设内容设计网站在线客服系统 免费
  • 十堰互联网公司手机优化软件下载
  • 枣庄做网站杭州搜索推广公司
  • 网站建设分哪些类别产品营销方案案例范文