Python Forum
[Tkinter] Help with tkinter; images and button commands
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tkinter] Help with tkinter; images and button commands
#3
In addition, use partial to send args to a function
from functools import partial
...
## there is no function CharacterSelection in the code you posted
ShotonButton = Button(tk, text="", command=partial(CharacterSelection, 1), bg='red')
when you have time, peruse the Python Style Guide, function names are all_lower_case_with_underscores.
Reply


Messages In This Thread
RE: Help with tkinter; images and button commands - by woooee - Mar-28-2019, 02:01 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [Tkinter] TKinter Remove Button Frame Nu2Python 8 1,012 Jan-16-2024, 06:44 PM
Last Post: rob101
  tkinter - touchscreen, push the button like click the mouse John64 5 869 Jan-06-2024, 03:45 PM
Last Post: deanhystad
  Problems trying to position images with Tkinter emont 3 785 Dec-12-2023, 07:20 AM
Last Post: menator01
  Centering and adding a push button to a grid window, TKinter Edward_ 15 4,861 May-25-2023, 07:37 PM
Last Post: deanhystad
  Can't get tkinter button to change color based on changes in data dford 4 3,437 Feb-13-2022, 01:57 PM
Last Post: dford
  Creating a function interrupt button tkinter AnotherSam 2 5,562 Oct-07-2021, 02:56 PM
Last Post: AnotherSam
  [Tkinter] Have tkinter button toggle on and off a continuously running function AnotherSam 5 5,031 Oct-01-2021, 05:00 PM
Last Post: Yoriz
  tkinter showing image in button rwahdan 3 5,649 Jun-16-2021, 06:08 AM
Last Post: Yoriz
  tkinter button image Nick_tkinter 4 4,068 Mar-04-2021, 11:33 PM
Last Post: deanhystad
  tkinter python button position problem Nick_tkinter 3 3,575 Jan-31-2021, 05:15 AM
Last Post: deanhystad

Forum Jump:

User Panel Messages

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