我正在使用c#windows窗体应用程序,所以我有一个简单的Form包含XtraScrollableControl中的picturebox(使PictureBox可滚动)并且它有效!但我想改变滚动条的默认设计,从白色或银色我觉得到特定的颜色请检查下面的截图谢谢。
问候。
答案 0 :(得分:1)
如果你使用VScrollBar,你可以设置
import time, random
from tkinter import *
class Application(Frame):
def __init__(self, master):
Frame.__init__(self, master)
self.grid()
self.create_widgets()
def create_widgets(self):
self.lbl1=Label(self, text="Write your message:")
self.lbl1.grid(row=0, column=0, columnspan=2, sticky=W)
self.entry=Entry(self)
self.entry.grid(row=0, column=2, columnspan=3, sticky=W)
self.bttn=Button(self, text="Send", command=self.send)
self.bttn.grid(row=1, column=0, sticky=W)
def send(self):
# self.start=time.time()
# I think you don't need that anymore...
self.lbl2=Label(self, text="Sending...")
self.lbl2.grid(row=1, column=1, sticky=W)
time.sleep(2)
self.lbl2.destroy()
root=Tk()
root.title("Mail")
app=Application(root)
root.mainloop()