how to style one particular treeview

Liste des GroupesRevenir à cl tcl 
Sujet : how to style one particular treeview
De : m.n.summerfield (at) *nospam* gmail.com (Mark Summerfield)
Groupes : comp.lang.tcl
Date : 17. Jul 2025, 08:36:19
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <105a95j$17qfs$1@dont-email.me>
User-Agent : Pan/0.154 (Izium; 517acf4)
I am using one particular ttk::treeview as a listbox:

    ttk::frame .ignoresForm.ignoresListFrame
    set ignoresList [ttk::treeview \
        .ignoresForm.ignoresListFrame.ignoresList -striped true \
        -yscrollcommand {.ignoresForm.ignoresListFrame.scrolly set}]
    ttk::style configure List.Treeview -indent 0
    #ttk::style map List.Treeview -indent [list disabled 0 active 0]
    $ignoresList configure -show tree -selectmode browse \
        -style List.Treeview
    $ignoresList column #0 -anchor w -stretch true
    ttk::scrollbar .ignoresForm.ignoresListFrame.scrolly -orient vertical \
        -command {.ignoresForm.ignoresListFrame.ignoresList yview}

By default a ttk::treeview has an -indent of 20 pixels which makes sense
for trees but is not needed for lists.

In the code above I've tried to create a custom style to apply to one
treeview but it has no effect whether I use ttk::style configure or
ttk::style map.

What is the correct way to do this?

Date Sujet#  Auteur
17 Jul08:36 * how to style one particular treeview4Mark Summerfield
17 Jul16:36 +* Re: how to style one particular treeview2Emiliano
17 Jul17:08 i`- Re: how to style one particular treeview1Mark Summerfield
17 Jul16:36 `- Re: how to style one particular treeview1Olivier

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal