Tk Source Code

View Ticket
Login
Ticket UUID: 8f2fdde1d234fef13b1ac9de7523def36ece1e51
Title: ttk::treeview: setting a padding on a tag makes focus ring visible again
Type: Bug Version: 9.1
Submitter: emiliano Created on: 2026-10-19 21:59:11
Subsystem: 88. Themed Tk Assigned To: nobody
Priority: 5 Medium Severity: Important
Status: Open Last Modified: 2026-10-20 06:04:48
Resolution: None Closed By: nobody
    Closed on:
Description:

Since the introduction of TIP 740, ttk::treeview displays a focus ring when a row is clicked. To get rid of such ring, a custom style is required:

ttk::style configure Nf.Treeview.Row -focusthickness 0
ttk::style map Nf.Treeview.Row -focusthickness {focus 0}

However, if a custom padding is used (for example, in a tag) part of the focus ring becomes visible again. See attached demo script. The visual artifact is present at least on X11 with the default theme.

User Comments: bohagan added on 2026-10-20 06:04:48:

A custom style isn’t needed. From the docs all you need is:

ttk::style configure Row -focusthickness 0

ttk::style map Row -focusthickness {}

The padding issue is a ttk issue since 9.0. See the last few comments in forum.


Attachments: