[Tkinter-discuss] [Fwd: Re: Change control styles ttk.Scrollbar]

craf prog at vtr.net
Thu Dec 23 21:06:59 CET 2010


--------- Mensaje reenviado --------
> De: Michael Lange <klappnase at web.de>
> Para: tkinter-discuss at python.org
> Asunto: Re: [Tkinter-discuss] Change control styles ttk.Scrollbar
> Fecha: Thu, 23 Dec 2010 18:53:48 +0100
> 
> Hi,
> 
> Thus spoketh craf <prog at vtr.net> 
> unto us on Thu, 23 Dec 2010 10:49:27 -0300:
> 
> > Hi.
> > 
> > Is it possible to change the background color of a control
> > ttk.Scrollbar?.
> > In its standard options is Style, but this seems not to work:
> > 
> > Example:
> > 
> > s.configure('TScrollbar', background='#cccccc') no works.
> > 
> > Thanks in advance.
> 
> Can you show a more detailed example of what you wanted to schieve and
> what exactly happened?
> I tried this short snippet, which works as expected:
> 
> from Tkinter import *
> import ttk
> 
> root = Tk()
> s=ttk.Style()
> s.configure('TScrollbar', background='red')
> sb = ttk.Scrollbar(root)
> sb.pack(side='right', fill='y')
> root.mainloop()
> 
> Regards
> 
> Michael
> 
> 
> .-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.
> 
> No one wants war.
> 		-- Kirk, "Errand of Mercy", stardate 3201.7
> _______________________________________________
> Tkinter-discuss mailing list
> Tkinter-discuss at python.org
> http://mail.python.org/mailman/listinfo/tkinter-discuss

Thanks Michael!

Not because my example was not working and if yours.
Anyway, your example helped me.

Regards.

Cristian






More information about the Tkinter-discuss mailing list