473,320 Members | 1,926 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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.
Apr 17 '15 #1

✓ answered by dwblas

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

2 1476
bvdet
2,851 Expert Mod 2GB
Assign a command to your button. The command could concatenate the current contents of the entry widget with the label of the button.
Apr 17 '15 #2
dwblas
626 Expert 512MB
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
Apr 17 '15 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: TJS | last post by:
trying to get 2 scripts to run when a button is clicked. The first is a confirm which should only run the second script if true. the problem is the second script doesn't run when "ok" is selected...
0
by: L Mehl | last post by:
Hello -- My form's cmdCancel button requires 3 clicks before the code in Cancel_Click fires. Each click prior to that success moves the highlight to the next field in the Tab order . I...
2
by: Patrick | last post by:
i have the following .aspx file defined: ..... other tags here ... <asp:TableCell><asp:button id="AddButton" Runat="server" Text="Add New Vessel..."</asp:button></asp:TableCell> ..... other tags...
2
by: bkunjitam | last post by:
Hi, I am using Python 2.5. I have an entry field and a radio button. I need to disable the entry field when the radio button is selected. How do i change the state to DISABLED in run time. ...
6
by: =?Utf-8?B?L2Rldi9udWxs?= | last post by:
Hello, i am using visual studio 2003 enterprise architect version. I am making apps for the .Net framework 1.1. While testing an interface, i discovered something strange. In this application...
1
by: CHNLAKSHMI | last post by:
There are two textboxes and a button. If we click the button,the text must be entered into focused textbox
3
matrekz42
by: matrekz42 | last post by:
This may seem extremely simple, but I want to have in VB a code that will change the width of a TextBox when a button in the form is clicked. How can I go about this?
5
by: Jim in Arizona | last post by:
When placing a link using html, it's easy to have a new window opened for the link instead of redirecting the current page to the destination. IE: <a href="../folder5/anotherpage.aspx"...
1
by: Claudiu | last post by:
Hi, I have the following code and no matter what I do onclick event for button is not firing. I tried deleting the button, the pages. Redid the code. Moved the web project to a different...
1
by: mcupito | last post by:
I've a Combobox in a subform that will contain values. While entering data on the subform, a value of '?????' is acceptable, however when the 'Submit' button is clicked on the main form, I wish to...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.