Thanks, it was sensitive but not "Activable" (I don't know that property in english since I'm using the spanish locale). Once I changed this it's all ok. On Thu, 14 Oct 2004 20:17:11 -0400, Daniel Nilsson <daniel@xxxxxxxxxxxxxxx> wrote: > On Thu, Oct 14, 2004 at 02:02:53PM +0200, José Antonio Sánchez wrote: > > > > I'm using gtk 2.4.11 on a Debian unstable system and I've got a problem. > > I made a GUI using glade with anjuta. I want an entry widget to be not > > editable until a button is pressed. > > I checked in glade the editable property to no in the entry widget and > > then added a handler to the clicked signal of the button with the > > following code (on callbacks.c): > > > > void > > on_boton_clicked (GtkButton *button, > > gpointer user_data) > > { > > printf("Clicked\n"); > > GtkWidget *entry = lookup_widget(GTK_WIDGET(button),"entry"); > > gtk_editable_set_editable(GTK_EDITABLE(entry),TRUE); > > } > > > > but when I run the program and click on the button I can see the > > clicked message (so the method is executed) but I cannot edit text in > > the entry. Why? Am I doing something wrong? > > Hi, > > The reason is that glade is using gtk_widget_set_sensitive to set the > widget insensitive. I reproduced your problem and the solution it to > use this code instead to set it sensitive: > > GtkWidget *entry = lookup_widget(GTK_WIDGET(button),"entry"); > gtk_widget_set_sensitive(GTK_WIDGET(entry),TRUE); > > -- > Daniel Nilsson > > _______________________________________________ > > gtk-list@xxxxxxxxx > http://mail.gnome.org/mailman/listinfo/gtk-list > _______________________________________________ gtk-list@xxxxxxxxx http://mail.gnome.org/mailman/listinfo/gtk-list