Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import tkinter as tk
- from tkinter import filedialog
- class Application(tk.Frame):
- def __init__(self, parent):
- tk.Frame.__init__(self, parent)
- self.parent = parent
- self.pack()
- self.createWidgets()
- def createWidgets(self):
- #save button
- self.saveLabel = tk.Label(self.parent, text="Save File", padx=10, pady=10)
- self.saveLabel.pack()
- #I'm trying to get command to call the test function from documentMaker
- self.saveButton = tk.Button(self.parent, text = "Save", command = hello)
- self.saveButton.pack()
- class documentMaker():
- def test(self):
- print ("hello people")
- root = tk.Tk()
- app = Application(root)
- app.master.title('Sample application')
- object = documentMaker()
- hello = object.test()
- #object.convert()
- app.mainloop()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement