我不明白为什么它没有在后台添加图像

时间:2019-05-18 21:20:48

标签: python tkinter

from patient import Patient
from tkinter import *
class Emergency:
    def __init__(self, root):
        self.root = root

        self._Frame = Frame(root,  width=900, height=720, bg='grey')
        self._Frame.pack()
        img = PhotoImage('C:\\Users\\Taveed Rizvi\\PycharmProjects\\Tkinter_module\\Hospital_Management\\emergency.jpg')
        self.heading = Label(root,image=img, text=" Welcome to Emergency Watt", font='italic 35 bold', fg='black', bg='grey')
        self.heading.place(x=40, y=0)

        self.patinet = Button(root, text="Add Emergency Patient",fg='black', bg='white',command=self.add_patient)
        self.patinet.place(x=40, y=100)

    def add_patient(self):
        self._Frame.destroy()
        self.heading.destroy()
        Patient(self.root)

0 个答案:

没有答案