how can i asssign a buttons label to an entry in python when the button is clicked?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shiroonjuguna
    New Member
    • Apr 2015
    • 1

    how can i asssign a buttons label to an entry in python when the button is clicked?

    am trying to give functionality to calculator buttons.that is, when i click the button like button with label 7, the letter 7 should appear in an entry.
  • bvdet
    Recognized Expert Specialist
    • Oct 2006
    • 2851

    #2
    Assign a command to your button. The command could concatenate the current contents of the entry widget with the label of the button.

    Comment

    • dwblas
      Recognized Expert Contributor
      • May 2008
      • 626

      #3
      See the first example at http://effbot.org/tkinterbook/button.htm which shows how to connect a function to a button click. Instead of a print, you would (sometimes delete first and) insert into the Entry like the first example at http://effbot.org/tkinterbook/entry.htm

      Comment

      Working...