0

In Tkinter, I am trying to make the askdirectory menu more user friendly. Is there a way to center the focus of the window on the last folder opened, both vertically and horizontally? I don't want my users to have to scroll right when they get deep into subfolders.

def action1():
    master.withdraw()
    dirname = tkFileDialog.askdirectory(parent=master,initialdir='./',title='Please select Lot directory')
    global dirname  
    master.destroy()
2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by graydog8josh
0

Give starting directionary as initialdir passed to the function as parameter, return current directory as value from function and save in caller, no globals.

Edited by pyTony

0

Okay,

 def action1(i_directory):
     master.withdraw()
     dirname = tkFileDialog.askdirectory(parent=master,initialdir=i_directory,title='Please select Lot directory')

     master.destroy()

Can someone please answer my question? How can i resize the Tkinter askdirectory window. to fit all the subdirectories i want to open without having to scroll. Im going through about 8 subfolders.
\computer\longfoldername\longfoldername1\longfoldername\longfoldername\longfoldername\longfoldername\subfolder

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.