Python Forum
[Tkinter] image inside button
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] image inside button
#1
I am trying to add image inside a button. It is empty, I have the image in the exact location and no errors.

    photo1 = PhotoImage(file="imgs/math/1.png")
    photoimage1 = photo1.subsample(3, 3)
    Button(exam_started,image=photoimage1).pack()
Thanks
Reply


Messages In This Thread
image inside button - by rwahdan - Jul-12-2021, 05:54 PM
RE: image inside button - by deanhystad - Jul-12-2021, 06:26 PM
RE: image inside button - by rwahdan - Jul-12-2021, 07:05 PM
RE: image inside button - by Yoriz - Jul-12-2021, 07:31 PM
RE: image inside button - by deanhystad - Jul-12-2021, 08:49 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [Tkinter] Why does the image for the button not appear? finndude 4 2,094 Oct-21-2021, 06:41 PM
Last Post: deanhystad
  tkinter showing image in button rwahdan 3 5,624 Jun-16-2021, 06:08 AM
Last Post: Yoriz
  [Kivy] Acces atributes from a button defined in a class inside the .kv Tomli 2 2,088 Jun-10-2021, 01:05 AM
Last Post: Tomli
  tkinter button image Nick_tkinter 4 4,041 Mar-04-2021, 11:33 PM
Last Post: deanhystad
  Problem about image and button scotesse 5 2,962 Apr-27-2020, 10:09 AM
Last Post: scotesse
  [PyQt] Problem how to click a button inside a group box? mart79 2 3,438 Aug-05-2019, 01:21 PM
Last Post: mart79
  Button with Image Icon Friend 2 6,823 Jul-25-2019, 09:39 AM
Last Post: Friend
  [PySimpleGui] How to alter mouse click button of a standard submit button? skyerosebud 3 5,012 Jul-21-2019, 06:02 PM
Last Post: FullOfHelp
  [Tkinter] Resizing image inside Canvas (with Canvas' resize) Gupi 2 25,098 Jun-04-2019, 05:05 AM
Last Post: Gupi
  Simple Button click on image file to create action? jpezz 4 6,870 Mar-27-2019, 10:08 PM
Last Post: jpezz

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020