from tkinter import *
from tkinter import ttk
from tkinter import filedialog
import test_python3

class Root(Tk):
    def __init__(self):
        super(Root, self).__init__()
        self.title("Malware Detection")
        self.minsize(500, 300)

        self.labelFrame = ttk.LabelFrame(self, text = "     Open File")
        self.labelFrame.grid(column = 0, row = 1, padx = 200, pady = 20)

        self.button()



    def button(self):
        self.button = ttk.Button(self.labelFrame, text = "Browse A File",command = self.fileDialog)
        self.button.grid(column = 1, row = 1)


    def fileDialog(self):

        self.filename = filedialog.askopenfilename(initialdir =  "/", title = "Select A File")
        self.label = ttk.Label(self.labelFrame, text = "")
        self.label.grid(column = 1, row = 2)
        self.label.configure(text = self.filename)




root = Root()
root.mainloop()