3

I want to make a rounded OptionMenu with the ttk style, but I can't think on way doing so, and I can't find it anywhere on the internet.

This what I have so far:

from tkinter import *
from tkinter import ttk

master = Tk()
style = ttk.Style()
style.configure("TMenubutton", background="blue")
variable = StringVar(master)
variable.set("Everyone")
menu = ttk.OptionMenu(master, variable, "Everyone", style="TMenubutton")
menu.pack()
mainloop()

It looks like this:

enter image description here

and I want to have this:

enter image description here

  • Ignore the colors.
Anon142
  • 31
  • 1
  • I haven't found a solution yet, but if you take a look at the [Sun Valley](https://github.com/rdbende/Sun-Valley-ttk-theme) ttk theme, you can see that it has a [rounded `OptionMenu`](https://raw.githubusercontent.com/rdbende/Sun-Valley-ttk-theme/master/Screenshot.png). Somewhere in there is the solution. Alternatively, you could just use the theme itself (no, I am not affiliated with that theme, in case you're wondering). – Sylvester Kruin Mar 05 '22 at 17:05

0 Answers0