gtk_editable_set_editable not working.



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?



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]