how to get selected filename in FileSelectBox
Question posted by: wilson
(Guest)
on
July 5th, 2008 06:25 AM
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
Not the answer you were looking for? Post your question . . .
190,081 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).
|
|
|
Latest Articles: Read & Comment
Top Community Contributors
|