-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstatus bar.py
32 lines (21 loc) · 894 Bytes
/
status bar.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import tkinter as tk
from tkinter import filedialog
window = tk.Tk()
window.title('Open File Dialog')
window.geometry('1000x50')
def get_img(empty=None):
path = filedialog.askopenfilename(initialdir=r'C:\\',
title='Select a file',
filetypes=(
('PNG Files', '*.png'),
('JPG Files', '*.jpg'),
('JPEG Files', '*.jpeg'),
('BITMAP Files', '*.bmp')
)
)
b1 = tk.Button(text='Select Images',
command=get_img)
b1.pack()
l1 = tk.Label(text=f'Image Path ---> {path}').pack()
#my_img = tk.PhotoImage(path)
window.mainloop()