title: Tkinter - Custom items in a TreeView widget
body: <p>I have two simple questions about the <code>TreeView</code> widget:</p>
  
  <ol>
  <li><p>how can I change the background of an item placed in my <code>TreeView</code> widget?</p></li>
  <li><p>when I select my custom item (see the point one), it doesn't be highlighted. how can I reach my goal?</p></li>
  </ol>
  
  <p>I attached a screenshot to make it easy to understand what I wanna do:</p>
  
  <p><a href="https://i.stack.imgur.com/OEgtk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OEgtk.png" alt="enter image description here"></a></p>
  
  <p>below code example, it's a simple <code>TreeView</code> widget, how can I apply the right changed to reach my goal?</p>
  
  <pre><code>from tkinter import *
  from tkinter import ttk
  
  root = Tk()
  
  tree = ttk.Treeview(root, height=15)
  
  tree.insert("" , 0, "Menu0",text="Item 1")
  tree.insert("Menu0", 0, "Menu0-0",text="1")
  tree.insert("Menu0", 1, "Menu0-1",text="2")
  
  tree.insert("", 1, "Menu1", text="Item 2")
  tree.insert("Menu1", 0, "Menu1-0", text="1")
  tree.insert("Menu1", 1, "Menu1-1", text="2")
  
  tree.insert("", 2, "Menu2", text="Item 3")
  tree.insert("Menu2", 0, "Menu2-0", text="1")
  tree.insert("Menu2", 1, "Menu2-1", text="2")
  
  tree.insert("", 3, "Menu3", text="Item 4")
  tree.insert("Menu3", 0, "Menu3-0", text="1")
  
  
  tree.pack()
  root.mainloop()
  </code></pre>