[Tutor] Entry box + browse button SOLVED

Alan Gauld alan.gauld at blueyonder.co.uk
Sun Aug 15 09:54:17 CEST 2004


> Actually i wasnt that far from the solution as i was thinking. The
thing was
> to delete the text in the box before trying to add a new one
(otherwise the
> new filename gets appended after the default one.

Ah yes, I wondered about that but thought the insert method would
work...
But the use of StrVar() should definitely not require that, I'd
forgotten about StrVar!

>     def openInFile(self):
>         import tkFileDialog
          ...

>     def saveAsFile(self):
>         import tkFileDialog
          ...

Better not to import in two places, put the import at the top along
with the other import lines.

Alan G.



More information about the Tutor mailing list