Python Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesPython Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 1st, 2004, 11:35 AM
Nick889 Nick889 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 6 Nick889 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to Nick889
Noob With Widgets

I am currently reading an e-book about python and its coming now to the part about widgets and stuff. I want to know if there is a website of some sort that can show and demenstrate all the different actions you can do with a widget. One in paticular i am having trouble with is clearing out an entry box. Like if the user typed something but then changed his/her mind they could click a button and then it would clear it out by deleting the text in the box. I can figure out how to add text but not how to clear the box. Any help is appreciated though a website for all widgets would help me in the future.

Also, if you used to different programming styles, i am using a style like this...

def close(event):
sys.exit(0)

button = Button(root)
button.bind("<Button-1>")
...

in other words, i am using "bind", for my buttons.

Reply With Quote
  #2  
Old January 1st, 2004, 01:35 PM
Nick889 Nick889 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 6 Nick889 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to Nick889
I found a website called pythonware.com, and so far its been a big help and i even got my program thing to work. Although, if you still know of some sources that would be great too. Thanks.

Reply With Quote
  #3  
Old January 1st, 2004, 07:40 PM
rebbit rebbit is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 84 rebbit User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 7 m
Reputation Power: 6
I will assume you're using Tkinter, and say it is quite easy to clear the contents of an Entry or Text widget. Here is a quick example:

Code:
#clear an Entry widget
entry_widget.delete(0,END)
#clear a Text widget
text_widget.delete(1.0,END)


I'm not sure if you need to know how to set up a button to clear the widget, or just what method should be called to do it. If I didn't hit the nail on the head, let me know

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPython Programming > Noob With Widgets


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT