1.首先制作一个简单的可视化界面,使用python自带库tkinter,代码如下
from tkinter.scrolledtext import ScrolledText
from tkinter import *
import tkinter as tk
import os
dop=[]
doom=[]
window = Tk()
window.title("正交表()") # title() 定义这个窗口的标题
window.geometry("850x600") # geometry() 定义窗口的大小
srcLanguage = StringVar()
srcLanguage.set(',')
Label(window, text="内分隔符:",font=("隶书", 12)).place(x=680, y=170)
languages = (',', ' ', ',', '.','。')
ttk.Combobox(window, values=languages, width=6, textvariable=srcLanguage, state='readonly').place(x=760, y=170)
Label(window, text="--输入数据--",font=("隶书", 14)).place(x=270, y=1)
scr = scrolledtext.ScrolledText(window, width=80, height=15, font=("隶书", 12)) # 滚动文本框(宽,高(这里的高应该是以行数为单位),字体样式)
scr.place(x=15, y=25) # 滚动文本框在页面的位置
Label(window, text="--输出结果为--",font=("隶书", 14)).place(x=265, y=270)
scr1 = scrolledtext.ScrolledText(window, width=80, height=15, font=("隶书", 12)) # 滚动文本框(宽,高(这里的高应该是以行数为单位),字体样式)
scr1.place(x=15, y=300) # 滚动文本框在页面的位置
srcLanguag = StringVar()
srcLanguag.set(':')
Label(window, text="项目分隔:",font=("隶书", 12)).place(x=680, y=80)
language = (':', ';', ';', ':','>','<')
ttk.Combobox(window, values=language, width=6, textvariable=srcLanguag, state='readonly').place(x=760, y=80)
button2 = Button(window, text="运 行",bg="green",font=("隶书", 20), command=yunxin) #按键
button2.place(x=540, y=560, width=80, height=30) #按键位置
button3 = Button(window, text="导 出",bg="yellow",font=("隶书", 20), command=daocu) #按键
button3.place(x=290, y=560, width=80, height=30) #按键位置
button1 = Button(window, text="删 除",bg="red", font=("隶书", 20), command=cancelMsg) #anjian
button1.place(x=40, y=560, width=80, height=30) #按键位置
Label(window, text="测试用例",font=("隶书", 13)).place(x=700, y=310)
Label(window, text="平台:A,B,C",font=("隶书", 11)).place(x=695, y=340)
Label(window, text="项目:E,F,G",font=("隶书",

本文介绍了如何使用Python的tkinter库创建一个简单的可视化界面,展示正交表的应用。通过提供的代码示例,展示了界面的实现过程,并期望通过读者的反馈进行改进。
最低0.47元/天 解锁文章
1740

被折叠的 条评论
为什么被折叠?



