Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

tk... naming a widget with file name + extension

Status
Not open for further replies.

aleph1ow

Programmer
Jun 20, 2007
3
0
0
IT
Hello,
Is there a way to name a widget with a name that contains the file extension?
When I try to do this I get a "bad window path name" error, because tk uses "full stop" saparator to name its widgets and when the full stop (part of the extension of the file) occurs, the tk parser returns an error.
After the full stop the parser expects another widget, not the file extension.(I think...)

EXAMPLE:

.filename.txt

Sorry for my bad english!:(
Any suggestion is much appreciated.
Paolo
 
Well, the short answer is "no". If you're absolutely sure that you want to do that (it seems pretty silly to me), you can build a frame, .filename:
pack [frame .filename] -side top and put your widget in that frame:
pack [text .filename.txt] -side top, assuming you've got a text widget.

Why I say this is silly is because it seems to me to confuse the widget with the contents.

_________________
Bob Rashkin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top