Python, tkinter, tksheet self.sheet.set_row_heights() not working

Python, tkinter, tksheet self.sheet.set_row_heights() not working

I use tksheet and whenever a cell is edited, I want to "reset" the column width and height. The height however is not set acordingly while the width is.

class Orderbuch(tk.Tk):
    
    def set_header(self):
        self.sheet1.headers(col_headers)
        self.sheet1.set_column_widths(col_headers_widths)
        self.sheet1.set_row_heights(26)

Answer

It works to set reset=True

self.sheet.set_row_heights(26, reset=True)

Other solutions like refreshing the sheet (self.sheet.refresh()) doesn't work for me.

Enjoyed this article?

Check out more content on our blog or follow us on social media.

Browse more articles