PDA

View Full Version : simple python question



ubudog
July 15th, 2010, 02:39 AM
Hello, I am wondering how to make a Tkinter button make a text area (or label, I think) say something. In the callback for the button, what is the syntax? Thanks.

Bachstelze
July 15th, 2010, 03:29 AM
label.configure(text="blah blah blah")

ubudog
July 15th, 2010, 04:17 AM
Exactly what I was looking for. Thanks! Another question, the text goes off the screen when I run the app, so how do I make the text area bigger?

Bachstelze
July 15th, 2010, 04:55 AM
Probably

label.configure(width=n)

where n is the nmber of characters in the text. Not sure about that one, though.

ubudog
July 15th, 2010, 05:54 PM
Thanks for all the help, but one more question. How do I make a button open another program? Like when I click the button, it opens firefox, or another python program I created. Thanks.

ubudog
July 16th, 2010, 03:00 AM
Nevermind, figured it out. Thanks for your help!