From 49e976e4b79af998b690530211bd47cba54a6574 Mon Sep 17 00:00:00 2001 From: "a.jurcenko" Date: Tue, 5 Sep 2023 16:36:34 +0200 Subject: [PATCH] initial commit. Drop Files work --- .idea/.gitignore | 3 +++ .../inspectionProfiles/profiles_settings.xml | 6 ++++++ .idea/misc.xml | 4 ++++ .idea/modules.xml | 8 ++++++++ .idea/test_tkinter_drop_files.iml | 10 ++++++++++ .idea/vcs.xml | 6 ++++++ main.py | 18 ++++++++++++++++++ requirements.txt | Bin 0 -> 42 bytes 8 files changed, 55 insertions(+) create mode 100644 .idea/.gitignore create mode 100644 .idea/inspectionProfiles/profiles_settings.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/test_tkinter_drop_files.iml create mode 100644 .idea/vcs.xml create mode 100644 main.py create mode 100644 requirements.txt diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..26d3352 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..45d49fd --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..2d68575 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/test_tkinter_drop_files.iml b/.idea/test_tkinter_drop_files.iml new file mode 100644 index 0000000..74d515a --- /dev/null +++ b/.idea/test_tkinter_drop_files.iml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/main.py b/main.py new file mode 100644 index 0000000..d258057 --- /dev/null +++ b/main.py @@ -0,0 +1,18 @@ +import tkinter as tk +from tkinterdnd2 import DND_FILES, TkinterDnD + +window = TkinterDnD.Tk() + +main_frame = tk.Frame(window, padx=50, pady=20) +main_frame.pack(fill=tk.BOTH, expand=True) + +listbox = tk.Listbox(main_frame) +listbox.drop_target_register(DND_FILES) +listbox.dnd_bind('<>', lambda x: listbox.insert(tk.END, x.data)) +listbox.pack(fill=tk.BOTH, expand=True) + +button = tk.Button(main_frame, text='Button') +button.pack(fill=tk.BOTH, expand=True) + +window.mainloop() + diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000000000000000000000000000000000000..ab01e4b960c197623e2121b1d4c110175fe16769 GIT binary patch literal 42 tcmezWuY@6+A(J7Gp@boop@<;`$Vy=_Vz3250|q??V<0wQ;AP-q008Tb2j>6) literal 0 HcmV?d00001