Aug-17-2020, 07:18 PM
Hey! Friends I Am Working On A MP3 Player But Problem IS Image Is Not Showing!!
from tkinter import *
import pygame
window = Tk()
window.iconbitmap('logo.ico')
window.title("MP3 PLAYER")
window.geometry("500x300")
#INITIALIZE PYGAme
pygame.mixer.init()
#Create A Playlist
song_list = Listbox(window,bg='black',fg='green',width=60)
song_list.pack(pady=20)
#Define Player Buttons Image
play_btn_img = PhotoImage(file='play.png')
pause_btn_img = PhotoImage(file='pause.gif')
backward_btn_img = PhotoImage(file='backward.png')
forward_btn_img = PhotoImage(file='forward.png')
stop_btn_img = PhotoImage(file='stop.png')
#Create Player Control Frame
control_frames = Frame(window)
control_frames.pack()
#Create Player Button
backward_button = Button(control_frames,image=backward_btn_img)
forward_button = Button(control_frames,image=forward_btn_img)
start_button = Button(control_frames,image=play_btn_img)
stop_button = Button(control_frames,image=stop_btn_img)
pause_button = Button(control_frames,image=pause_btn_img)
#Grids
backward_button.grid(row=0,column=0,padx=10)
forward_button.grid(row=0,column=1,padx=10)
start_button.grid(row=0,column=2,padx=10)
stop_button.grid(row=0,column=3,padx=10)
pause_button.grid(row=0,column=4,padx=10)
window.mainloop()
