File tree
Expand file treeCollapse file tree1 file changed
+3
-5
lines changed Sample GUI Implementation
Expand file treeCollapse file tree1 file changed
+3
-5
lines changed Original file line number | Diff line number | Diff line change |
---|
|
1 |
| -'''IMAGE VIEWER |
| 1 | +'''Py IMAGE VIEWER |
2 | 2 |
|
3 | 3 | PySimpleGUI reads images in PNG, GIF, PPM/PGM format.
|
4 | 4 | JPEGs cannot be shown because tkinter does not naively support these formats.
|
@@ -125,10 +125,8 @@ def up_down_arrow_key_selection(arrow_key_event):
|
125 | 125 | elif EVENT == "-FILE LIST-": # Display the image selected.
|
126 | 126 | process_and_view_image()
|
127 | 127 |
|
128 |
| -elif EVENT == 'Up:38': |
129 |
| -up_down_arrow_key_selection(EVENT) |
130 |
| -process_and_view_image() |
131 |
| -elif EVENT == 'Down:40': |
| 128 | +# Listbox Navigation using Up/Down Arrow keys. |
| 129 | +elif EVENT in ('Up:38', 'Down:40'): |
132 | 130 | up_down_arrow_key_selection(EVENT)
|
133 | 131 | process_and_view_image()
|
134 | 132 |
|
|
You can’t perform that action at this time.
0 commit comments