How can I make the ttk.combobox like the one in this picture(ttk-Breeze).
CODE:
from tkinter import *
from tkinter import ttk
gray1 = "gray15"
gray2 = "gray20"
gray3 = "gray80"
class Theme():
def __init__(self):
# ================= CUSTOM THEME FOR COMBOBOX
style = ttk.Style()
style.theme_create('custom_style',
parent='alt',
# ================= COMBOBOX
settings={'TCombobox':
{'configure':
{
'fieldbackground': gray2,
'background': gray2,
'relief': FLAT,
'state': DISABLED
# "highlightthickness": [0],
# "borderwidth": [0],
}
},
}
)
style.theme_use('custom_style')
class App():
def __init__(self, root):
self.root = root
Theme.__init__(self)
options = ['Don', 'Tom', 'Harry']
cb = ttk.Combobox(self.root, values=options, state='readonly')
cb.pack()
def main():
root = Tk()
App(root)
root.config(bg=gray1)
root.geometry('300x300')
root.option_add('*TCombobox*Listbox.Background', gray2)
root.option_add('*TCombobox*Listbox.Foreground', gray3)
root.mainloop()
if __name__ == '__main__':
main()
When I use this theme there is still a border around the combobox and listbox too. I want to achieve completely flat ttk.combobox.