tksheet
tksheet copied to clipboard
readonly_header not work
I tried to set readonly options for header and i try this command self.cycle_frm.readonly_header(columns=[0, 1, 2]) but i get:
tksheet_tksheet_column_headers.py", line 576, in readonly_header self.cell_options[c]['readonly'] = True KeyError: 0
I have seen that function readonly_rows, readonly_columns, and readonly_cells have this type of line before assign True to readonly key:
if c not in self.col_options:
self.col_options[c] = {}
If i add these two lines to readonly_header in _tksheet_column_headers.py, it seems to work. (line 572)
else:
for c in columns_:
if c not in self.cell_options:
self.cell_options[c] = {}
self.cell_options[c]['readonly'] = True
Thanks very much for pointing this out to me!
It should be fixed with your addition in 5.4.1