Re: How to get or set the text of a textfield?
- From: Adam Tauno Williams <awilliam@xxxxxxxxxxxxx>
- Date: Mon, 11 Jul 2011 06:24:53 -0400
On Mon, 2011-07-11 at 03:44 +0000, John Gordon wrote:
In <mailman.877.1310350451.1164.python-list@xxxxxxxxxx> Anthony Papillion <papillion@xxxxxxxxx> writes:
So I've built a UI with Glade and have loaded it using the standard
Python code. In my UI, I have a textfield called txtUsername. How do I
get and set the text in this field from my Python code?
field.get_text()
field.set_text(value)
<http://pygtk.org/docs/pygtk/class-gtkentry.html#method-gtkentry--set-text>
and it will print a list of methods that are defined by that object.
Hopefully one of them will be called something helpful like set_text()
or set_property(). Once you know the method name, you might try a Google
search to determine the exact usage and arguments.
-1 -1 -1 Do not "google" [search the Internet] for solutions to pyGtk
problems. That is just a confusing waste of time. Use the *excellent*
and well-linked documentation:
<http://pygtk.org/docs/pygtk/>
<http://faq.pygtk.org/index.py?req=index>
The FAQ is extensive and really does cover a lot of the common
questions. Also there is a list specifically for pygtk questions:
<http://www.daa.com.au/mailman/listinfo/pygtk>
Google, or Bing, or even DuckDuckGo, are *not* your friends. They are
enormous and inefficient time-sinks. They are a *BAD* way to solve
problems. Use the documentation.
.
- Follow-Ups:
- Re: How to get or set the text of a textfield?
- From: John Gordon
- Re: How to get or set the text of a textfield?
- References:
- How to get or set the text of a textfield?
- From: Anthony Papillion
- Re: How to get or set the text of a textfield?
- From: John Gordon
- How to get or set the text of a textfield?
- Prev by Date: Re: A beginning programmer
- Next by Date: Re: Wgy isn't there a good RAD Gui tool fo python
- Previous by thread: Re: How to get or set the text of a textfield? - SOLVED
- Next by thread: Re: How to get or set the text of a textfield?
- Index(es):
Relevant Pages
|