def addLine(self, settingsList, dpsFrame):
lineNumber = len(settingsList)
settingsList.append({"transitionValue": "", "color": "#FFFFFF"})
settingsList[lineNumber]["transitionValue"] = tk.StringVar()
settingsList[lineNumber]["transitionValue"].set(str(100*lineNumber))
removeButton = tk.Button(dpsFrame, text="X", command=lambda:self.removeLine(lineNumber, settingsList, dpsFrame))
font = tkFont.Font(font=removeButton['font'])
font.config(weight='bold')
removeButton['font'] = font
removeButton.grid(row=lineNumber, column="0")
lineLabel = tk.Label(dpsFrame, text="Threshold when the line changes color:")
lineLabel.grid(row=lineNumber, column="1")
initialThreshold = tk.Entry(dpsFrame, textvariable=settingsList[lineNumber]["transitionValue"], width=10)
initialThreshold.grid(row=lineNumber, column="2")
initialLabel = tk.Label(dpsFrame, text="Color:")
initialLabel.grid(row=lineNumber, column="3")
colorButton = tk.Button(dpsFrame, text=" ",
command=lambda:self.colorWindow(settingsList[lineNumber], colorButton),
bg=settingsList[lineNumber]["color"])
colorButton.grid(row=lineNumber, column="4")
lineSettingsFrame.py 文件源码
python
阅读 25
收藏 0
点赞 0
评论 0
评论列表
文章目录