Tix.FileEntry directory

Tim Williams timothy.williams at nvl.army.mil
Fri Oct 4 15:50:46 CEST 2002


support @ internetdiscovery.com (Mike Clarkson) wrote in message news:<3d9ca678.2970545 at nntp.ix.netcom.com>...
> On 3 Oct 2002 08:25:24 -0700, timothy.williams at nvl.army.mil (Tim
> Williams) wrote:
> 
> >I'm trying to use the Tix.FileEntry widget. I can set the default
> >value, but how do I specify what directory to initially look in?
> 
> You want to set the entry subwidget:
> 
> import Tix
> root = Tix.Tk()
> foo = Tix.FileEntry(root)
> foo.subwidget('entry').insert(0,'/my/dir')
> foo.pack()
> 
> 
> Mike.

Thanks Mike,

I'm just learning Tix, and didn't know about the subwidget methods. I
knew about the subwidget_list from doing a dir() on the object.

I tried this, but it didn't seem to do what I'm needing. The value of
the entry subwidget  was changed, but if I click on the folder button,
the directory is still my current directory, not what a
os.path.dirname() of the file what give. My idea is that if the user
input the wrong filename, but the right directory in the path, he
wouldn't have to go browsing to find the right directory.

Also, what's a good way to check the validity path input initially?



More information about the Python-list mailing list