ttk.Treeview.heading

Treeview.heading(column, option=None, **kw)[source]

Query or modify the heading options for the specified column.

If kw is not given, returns a dict of the heading option values. If option is specified then the value for that option is returned. Otherwise, sets the options to the corresponding values.

Valid options/values are:
text: text
The text to display in the column heading
image: image_name
Specifies an image to display to the right of the column heading
anchor: anchor
Specifies how the heading text should be aligned. One of the standard Tk anchor values
command: callback
A callback to be invoked when the heading label is pressed.

To configure the tree column heading, call this with column = “#0”