'How to change number of heights in tkinter Treeview

I want to create a Treeview in tkinter that has the height value parameter modifiable. Here is a piece of my code.

cust = ttk.Treeview(root, column=("FName", "LName", "CustID"), show='headings', height=h)
cust.column("# 1", anchor=CENTER)
cust.heading("# 1", text="First Name")
cust.column("# 2", anchor=CENTER)
cust.heading("# 2", text="Last Name")
cust.column("# 3", anchor=CENTER)   
cust.heading("# 3", text="Customer ID")
cust.pack()

h is set at 9 but I want to can modify it to other value, for example 1 and whole Treeview to changeenter image description here

First image is wat I want but in the second one is what I still get...

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source