rdbende / Azure-ttk-theme

A stunning modern theme for ttk inspired by Fluent Design 💠
MIT License
717 stars 134 forks source link

Icon in button #52

Closed SweydManaf closed 1 year ago

SweydManaf commented 1 year ago

I can't add an icon in a button

rdbende commented 1 year ago

Could you share some example code?

SweydManaf commented 1 year ago
self.facebookIcon = ImageTk.PhotoImage(Image.open('assets/facebook.png').resize((50, 50)))
self.facebookButton = ttk.Button(self.mainFrame, text='Facebook', image=self.facebookIcon, compound=LEFT)

When I used the Sun Valley theme it worked. But in the projects I'm using the Azure theme doesn't work

SweydManaf commented 1 year ago

I solved it by adding a command to my button