From 614d9b37507f1f0085cf4d51eabb3d22feca612a Mon Sep 17 00:00:00 2001 From: jwansek Date: Wed, 24 Oct 2018 17:04:04 +0100 Subject: updated readme --- README.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) (limited to 'README.md') 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 -- cgit v1.2.3