Il 12/02/23 12:10, John O'Hagan ha scritto:
> My goal was to be able to change the colour of an individual item
> regardless of whether it is selected or not. To do that, it is
> necessary to be able to change the colour of an individual selected
> item, without changing the selection or changing
On Sun, 2023-02-12 at 08:59 -0500, Thomas Passin wrote:
[...]
> On 2/12/2023 6:10 AM, John O'Hagan wrote:
[...]
> >
> > My goal was to be able to change the colour of an individual item
> > regardless of whether it is selected or not. To do that, it is
> > necessary to be able to change the co
On 2/12/2023 6:10 AM, John O'Hagan wrote:
On Mon, 2023-02-06 at 10:19 -0800, stefalem wrote:
Il giorno sabato 4 febbraio 2023 alle 11:43:29 UTC+1 John O'Hagan ha
scritto:
...
Is there another way to do what I want?
from tkinter import *
from tkinter.ttk import *
root = Tk()
t = Treeview(roo
On Mon, 2023-02-06 at 10:19 -0800, stefalem wrote:
> Il giorno sabato 4 febbraio 2023 alle 11:43:29 UTC+1 John O'Hagan ha
> scritto:
> ...
>
> > Is there another way to do what I want?
>
> from tkinter import *
> from tkinter.ttk import *
>
> root = Tk()
> t = Treeview(root)
>
> t.insert('', 0
I apologize for the 3 messages sent, I could not access the usual news
server and with Google Groups I messed up :)
--
https://mail.python.org/mailman/listinfo/python-list
> Is there another way to do what I want?
try this:
from tkinter import *
from tkinter.ttk import *
root = Tk()
t = Treeview(root)
t.insert('', 0, iid='item1', text='item1')
t.insert('', 1, text='item2')
t.tag_configure('flashtag', background='red')
t.pack()
def flash():
tags = t.item('ite
Il giorno sabato 4 febbraio 2023 alle 11:43:29 UTC+1 John O'Hagan ha scritto:
...
> Is there another way to do what I want?
from tkinter import *
from tkinter.ttk import *
root = Tk()
t = Treeview(root)
t.insert('', 0, iid='item1', text='item1')
t.insert('', 1, text='item2')
t.tag_configure('f
I haven't worked specifically with a Treeview, but I think you need to
detect the onClick event (or an onSelect event if there is one) and have
that trigger the flashing. Otherwise the selection probably overwrites
styling that you added. That's what I do for classic Tk buttons to make
them fl
Hi list
I'm using a ttk Treeview to display a hierarchical data structure. When
an error condition arises in a node, I want the corresponding item in
the Treeview to flash its background color.
Using a tag to flash the item background works, except when the item is
selected, when the tag has no