[pygtk] Newbie question

John Barstow jbowtie at amathaine.com
Mon May 31 05:27:22 WST 2010


On Sun, May 30, 2010 at 10:49 PM, Brian Rowlands (Greymouth High
School) <RowlandsB at greyhigh.school.nz> wrote:
>
> My simple question is: how do I reference a textfield [ example ‘no_teams‘ ]
> when the button ‘on_show_settings’ is clicked. Say, print it’s contents.
>
> Any help greatly appreciated.
>

You want to use builder.get_object('no_teams') to reference the
textfield.  You can either pull out the specific fields in __init__
(like you did with the window) or save the builder and look up the
fields when you need them.

Any questions related to PyGTK are appropriate for the list, though
it's recommended that you consult the FAQ (handily linked in the list
footer) as a first point of reference.


More information about the pygtk mailing list