0

To make the border disapear or simply change it's color. I tried with highlighttickness or borderwidth but it doesn't work. So I was told to try with the layouts, the thing is I don't know how to change the border with the layouts

On this pic the border is still visible on the combobox I want to delete it or just change it's color

PS : That's not a duplicate previous questions were deleted

test

1 Answer 1

2

You can change the layout with the layout method of a style object. It can take as an argument a new layout to replace the current layout.

The following example illustrates how to remove the padding element around the checkbox, which I think might be the source of your light gray border:

style = ttk.Style()
layout = [
    ('Combobox.button', {
        'sticky': 'nswe',
        'children': [
                    ('Combobox.textarea', {
                        'sticky': 'nswe'
                    })
                ]
            })
]
style.layout("TCombobox", layout)

Changing styles and style layouts is unfortunately an under-documented feature of tkinter. However, there are several resources on the internet you might find useful:

1
  • Thank you very much ! I'll also check the links, but one last thing why the "changer" is gone ? idk how it's called but know my combobox kinda look entry now haha. Thanks anyway
    – jush456
    Aug 26, 2022 at 4:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.