Acglaphotis
October 7th, 2007, 05:28 PM
Hey
Im trying to print whatever is that the use wrote in a text entry field, be it by pressing a button or as the user types. I am using python + glade.
Any ideas?
Megaqwerty
January 30th, 2008, 06:13 PM
I don't know if your question has been answered yet, but just in case it helps:
def on_okButton_clicked(widget, data, wtree):
urlEntry = wTree.get_widget("urlEntry")
brwsrEntry = wTree.get_widget("brwsrEntry")
url = urlEntry.get_text()
browser = brwsrEntry.get_text()
os.system(browser + " " + url)
You'll obviously have to tweak this example to work with your program, but the main idea is that after you initialize the entry widget (in this case, urlEntry and brwsrEntry) you use ".get_text()" to retrieve the text in the field.
Hope that helped,
Megaqwerty
P.S. note that that isn't PHP code, it is python, but using the php tags gave me syntax highlighting.
Acglaphotis
January 30th, 2008, 06:26 PM
Thanks, i did find the answer to this question. I guess i forgot to mark it as solved. sorry for the trouble.
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.