aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md43
1 files changed, 43 insertions, 0 deletions
diff --git a/README.md b/README.md
index 4fac058..aebb705 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,45 @@
# tkFileBrowser
A file browser designed for use with Python tkinter applications
+
+![Demo image]((https://i.imgur.com/IXld2Ty.png))
+
+* Uses the Windows API to get the exact icon for any folder or application.
+* Refreshes when drives are added or removed
+* Final version will refresh the tree too
+
+## Example Usage
+
+ def on_click(path):
+ print("click: ", path)
+
+ if __name__ == "__main__":
+ root = tk.Tk()
+ browser = TkFileBrowser(root, on_click)
+ browser.pack(side = tk.LEFT)
+
+ ttk.Button(root, text = "Goto", command = lambda: browser.see(r"C:\Any\file\or\folder")).pack(side = tk.LEFT)
+
+ root.mainloop()
+
+## Documentation
+TkFileBrowser(parent, command, [refresh = 20], [types = []], [showhidden = False])
+
+> parent
+
+Frame in which the widget will be placed
+
+>command
+
+Function to be run when the user clicks on a file. The path is an argument
+
+>refresh
+
+How often to check for updates in the file system. Default 20ms
+
+>types
+
+List of file types that will show up. Empty means all files. Default []
+
+>showhidden
+
+Show hidden files "." or not. Default False