How to get or set the text of a textfield? - SOLVED

Anthony Papillion papillion at gmail.com
Mon Jul 11 00:09:27 EDT 2011


> I don't know anything about Glade, so I can't answer your question
> definitively.  However, as a general rule, you can use the dir() builtin
> function to see what methods are defined by an object.

Hi John,

Thanks for the input and it looks like it's pretty simple. Basically, I
can access the properties of objects like:

self.objectname.property_or_method()

So, to solve my question, I'd just use:

self.txtUsername.set_text('Whatever I want')

or

enteredText = self.txtUsername.get_text()

Pretty simple and this actually solves ALL of my Glade problems. I'm
excited.

Thanks for the direction!

Anthony



More information about the Python-list mailing list