On Thursday 21 December 2000 2:17 pm, Steven M. Castellotti wrote:
> So I'm new to pygtk, and beggining to experiment with
> libglade/gtk/gnome/python. I'm writing a simple app to help me learn how
> the various widgets work, but I'm certain I'm missing something.
>
> All I want to do is have the text field of an entry get updated from
> within the program when the user clicks on a button (and then the system
> spawns an xterm for no reason):
>
> def on_enter_button_clicked(obj):
> # Clicking this button simply launches an xterm
> entry = GladeXML("testApp.glade", "entry1").get_widget("entry1")
> entry.set_text("xterm launched")
> entry.set_visibility(invisible)
> print '%s' % entry.get_text()
> os.system('xterm &')
>
> The console will print out the "xterm launched" correctly, but the
> actual widget on the screen doesn't get redrawn. Is there something I
> have to tell it about explicitely?
Attached is a glade file and a python source file. Please take a look. They
do what you want...
Note that I connect something automagically using the dictionary and connect
the clicked signal manually, and also pass a refernece to the entry into the
function.
--
Edward Muller - [EMAIL PROTECTED] - [EMAIL PROTECTED]
Grow a ponytail -- view it as your telepathic antenna to other Linux Kernel
Developers. -- Jeff V. Merkey
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk