Skip to content

Commit

Permalink
Keyboard Shortcuts and Helpsite
Browse files Browse the repository at this point in the history
description says it all
  • Loading branch information
pagega committed Jan 14, 2024
1 parent c791400 commit 0a54ea7
Show file tree
Hide file tree
Showing 2 changed files with 567 additions and 1 deletion.
18 changes: 17 additions & 1 deletion Quellcode/Viewer V4.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,18 @@ def umwandeln_datum(datum_integer):
class GUI:

def __init__(self, master):

def on_arrow_key(event):
if event.keysym in ('Up', 'Down'):
# Calculate the number of lines to scroll (adjust the value as needed)
scroll_units = 3

if event.keysym == 'Up':
# Scroll up
self.table_view.yview_scroll(-scroll_units, 'units')
elif event.keysym == 'Down':
# Scroll down
self.table_view.yview_scroll(scroll_units, 'units')

self.scrollbar_table = ctk.CTkScrollbar(master, button_color= bg_colors['Scrollbar_slider'], button_hover_color= bg_colors['theme'])
master.style = ttk.Style()
Expand Down Expand Up @@ -277,7 +289,11 @@ def __init__(self, master):
self.set_column_width(3, 150) # Adjust the width of the third column
self.set_column_width(4, 350) # Adjust the width of the fourth column
self.set_column_width(5, 350) # Adjust the width of the fifth column


self.table_view.bind("<Up>", on_arrow_key)
self.table_view.bind("<Down>", on_arrow_key)


def change_mode(self):
if self.mode_button.config('text')[-1]== 'White':
self.mode_button.config(text='Dark ')
Expand Down
Loading

0 comments on commit 0a54ea7

Please sign in to comment.