Skip to content

Commit

Permalink
feature(ui): remove autosize method
Browse files Browse the repository at this point in the history
  • Loading branch information
Guts committed Jul 23, 2024
1 parent fa4a996 commit f6dbe16
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions dicogis/ui/scrollable_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ def create_widgets(self) -> None:
self.grid_rowconfigure(0, weight=1)
self.grid_columnconfigure(0, weight=1)

# Autosize the height of the table based on the number of rows
self.autosize_treeview_height()

def disable_event(self, event: Event) -> str:
"""
Disable the event to make the Treeview read-only.
Expand All @@ -82,9 +79,3 @@ def disable_event(self, event: Event) -> str:
str: "break" to indicate that the event should be ignored.
"""
return "break"

def autosize_treeview_height(self) -> None:
"""Autosize the height of the Treeview based on the number of rows."""
num_rows = len(self.tree.get_children())
max_visible_rows = 10
height = min(num_rows, max_visible_rows)

0 comments on commit f6dbe16

Please sign in to comment.