Search code examples
gtksignalsgtk2clickgtkentry

GTK+ (2.0) - signal "clicked" on GtkEntry?


I'm testing some signals with GTK+ 2.0. I'm looking for a way to get a signal emitted when I click on a GtkEntry.

if (widgets_info[i].action & IG_INPUT)
    {
      widget->frame[i] = gtk_entry_new_with_max_length(MAX_INPUT_LENGTH);
      gtk_entry_set_text(widget->frame[i], widgets_info[i].text);
      catch_signal(widget->frame[i], MY_SIGNAL, &change_entry, widget);
    }

I have a pre-selected text in my entry (widgets_info[i].text) and i want this text to disappear if the user click on my GtkEntry.

Does someone know what is this signal?

(Sorry for my English)


Solution

  • Try focus-in-event, note that you must enable focus-tracking as described in the documentation.