Both image and label in menu Both image and label in menu tkinter tkinter

Both image and label in menu


The menu or any label takes in an argument called compound

file_menu.add_command(label="Create new project", image=icons["new"],compound = LEFT, command=new_project)

here LEFT is from tkinter package and is for alignment. It is used to indicate as to which side the image has to be placed.

NOTE: If you have used import tkinter then you will have to write compound = tkinter.LEFT