I want to change the background colors of combobox so I used the theme style method,
combostyle = ttk.Style()
combostyle.theme_create('combostyle', parent = 'alt',
settings = {
'TCombobox': {
'configure': {
'fieldbackground': '#313131',
'foreground':'#FFFFFF',
'selectbackground':'',
'selectforeground':'#FFFFFF',
'bordercolor':'white',
'background': '' }
}
}
)
combostyle.theme_use('combostyle')
modechoices=ttk.Combobox(frame,values=["A","B","C"], background="black", foreground="white", width=50, state="readonly")
modechoices.place(x=20, y=250)
I am able to change some parameters but I want to change the select color and option menu color (listbox bgcolor). I have found some parameters in Changing Wiget Colors , but don't know which parameter will change the part I want
Is it possible to change those colors?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.