how to get selected filename in FileSelectBox

W

wilson

hi
i am using tix FileSelectBox in my application .I want to get the
selected filename as a string

i do this as follows

fselectbox=FileSelectBox(someframe)
fselectbox.__setitem__("dir",join(fselectbox.cget("dir"),".."))
fselectbox.pack(side=LEFT)
....
selectedfile=fselectbox.selection.cget("value")
fselectbox.selection.selection_clear()
print "file=",selectedfile

i did these by going thru the docs in tix ,actually i couldn't find an
example so i am not sure if this is the right way..it does print the
filename but i want to know if this is the way..Can someone comment?
Wilson
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top