Combobox fontsize in tkinter

后端 未结 2 1011
野趣味
野趣味 2020-12-20 23:22

Hi I am trying to use the ttk Combobox to create a dropdown with options . While doing so i can configure the font size of the default value passed to it . But when i click

2条回答
  •  别那么骄傲
    2020-12-20 23:57

    While working on the same issue as the OP, the problem of the arrow size mentioned in the comments of the accepted answer by Deepworks and fhdrsdg came up. Unfortunately I'm new and can't comment, hence I'm posting this as an answer. There is actually a way to set the arrow size via the Style "arrowsize" option.

    style = ttk.Style()
    style.configure('W.TCombobox',arrowsize = 60)
    cBox = ttk.Combobox(self, style='W.TCombobox')
    

    This allows you to increase the arrow size to match the font size of the rest of the widget.

    I found the reference to the "arrowsize" option here: Tcl8.6.10/Tk8.6.10 Documentation > Tk Commands > ttk_combobox

提交回复
热议问题