Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GUI
#4
There are lots of errors in your code
    def main():
        FileDialogDemo().mainloop()
 
    if __name__ == "__main__" :
        main()
        sys.exit()#exits system
these are indented into class FileDialogDemo remove the indenting


self.__root.title(os.path.basement(self.__file)+"-TextEditor")
os has not been imported


fileName = tkinter.filedialog.askopenfilename(parent = self,
                                                      filetypes = fList)
filedialog has been imported directly so tkinter. is not required in front of it


rook = Tk()
scrollbar = Scrollbar(root)
typo rook instead of root


Lots of tkinter object used in the code without importing tkinter, add the following import
import tkinter as tk
and then add tk. in front of all the tkinter objects
Reply


Messages In This Thread
GUI - by talkativemom - Jul-21-2020, 03:05 AM
RE: GUI - by menator01 - Jul-21-2020, 03:20 AM
RE: GUI - by talkativemom - Jul-21-2020, 03:37 AM
RE: GUI - by Yoriz - Jul-21-2020, 05:54 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020