python - 滚动条颜色不改变颜色
问题描述
我正在尝试更改 tkinter 程序中滚动条的颜色,但它没有改变,请帮忙。
from tkinter import *
import tkinter as tk
root = tk.Tk()
root.geometry('1000x800')
root.configure(bg='blue')
TextArea = Text(root, width=20,bg='#373B3F')
TextArea.place(x=350, y=40, width=250, height=250)
sscrollbar = tk.Scrollbar(TextArea, orient='vertical')
sscrollbar.pack(side=RIGHT, fill=Y)
TextArea.configure(yscrollcommand=sscrollbar.set)
sscrollbar.configure(command=TextArea.yview)
sscrollbar.configure(activebackground='red',bg='red')
root.mainloop()
解决方案
推荐阅读
- python - 如何使用 Python 从 dbus 插件(一个 systemd 服务)启动 gnome-terminal
- kubernetes - 构建 kubernetes 配置文件
- firefox - Web 组件不适用于 Firefox 扩展
- bash - 在 bash 中循环使用多个源的参数
- javascript - 从表单向框架窗口添加文本
- python - Python 脚本通过 websockets 与 Django Channels 通信
- sql - ORA-01722!为什么我不能在不出现此错误的情况下将 NUMBER 插入 NUMBER 数据字段?
- symfony - 解压 Symfony “标记的服务”
- java - Spring Boot 项目抛出“至少 1 个 bean 异常”
- tensorflow - 张量流中的豪斯多夫距离损失