•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Python section within the Software Development category of DaniWeb, a massive community of 391,555 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,639 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Python advertiser:
Views: 729 | Replies: 2 | Solved
![]() |
•
•
Join Date: Oct 2006
Location: New York City
Posts: 2,553
Reputation:
Rep Power: 7
Solved Threads: 1
Simply, I need to understand the basics of button binding. I have researched this already and have decided just to ask for instruction.
For example, one of the programs I am building currently will require, at a certain point, user input; I want to be able to know when a button has been pushed. I think I will have to use "<Button-1>" but I am not entirely sure of the rest of the necessary code needed to do so. I do not quite understand the syntax. What I have tried thus far has not worked.
The following is a snip of a button code (no use of binding) from the current Py project:
Any help would be greatly appreciated as it would put me close to finishing my build.
Thank-you.
sharky_machine
For example, one of the programs I am building currently will require, at a certain point, user input; I want to be able to know when a button has been pushed. I think I will have to use "<Button-1>" but I am not entirely sure of the rest of the necessary code needed to do so. I do not quite understand the syntax. What I have tried thus far has not worked.
The following is a snip of a button code (no use of binding) from the current Py project:
btn1 = Button(root ,bg="Black", text="HIT", image=image01,command=show_image2) btn1.configure(state=NORMAL,background='red' ) btn1.pack()
Any help would be greatly appreciated as it would put me close to finishing my build.
Thank-you.
sharky_machine
Last edited by mattyd : Jan 1st, 2007 at 3:34 am. Reason: sp
•
•
Join Date: Oct 2006
Location: New York City
Posts: 2,553
Reputation:
Rep Power: 7
Solved Threads: 1
•
•
•
•
Simply, I need to understand the basics of button binding. I have researched this already and have decided just to ask for instruction.
For example, one of the programs I am building currently will require, at a certain point, user input; I want to be able to know when a button has been pushed. I think I will have to use "<Button-1>" but I am not entirely sure of the rest of the necessary code needed to do so. I do not quite understand the syntax. What I have tried thus far has not worked.
The following is a snip of a button code (no use of binding) from the current Py project:
btn1 = Button(root ,bg="Black", text="HIT", image=image01,command=show_image2) btn1.configure(state=NORMAL,background='red' ) btn1.pack()
Any help would be greatly appreciated as it would put me close to finishing my build.
Thank-you.
sharky_machine
I figured it out
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb Python Marketplace
- Unresponsive Power Button on Gateway Laptop (Troubleshooting Dead Machines)
- Irritating Blank Taskbar Button (Windows NT / 2000 / XP / 2003)
- radio button ASP question?? (ASP)
- radio button ASP question?? (ASP)
Other Threads in the Python Forum
- Previous Thread: Setting directory for opening files
- Next Thread: Listbox in Tkinter python



Linear Mode