GtkCellRendererText saves on key-press-event



Hi

I'm new here, my first post. Thanks for reading.

I'd like to save entry in GtkCellRendererText when I click 'Tab' and move
to next GtkCellRendererText.

In main(),

g_signal_connect(G_OBJECT(note), "key-press-event",
G_CALLBACK(on_keypressevent), NULL);

In on_keypressevent(GtkWidget *widget, GdkEventKey *event, gpointer
user_data),

    if( strcmp(gdk_keyval_name(event->keyval), "Tab") == 0)
    {
        // when Tab is pressed, save data from entry
        // how to get data from entry?
    }

I know that if an entry is edited, "edited" signal will be emitted and
following parameters will be passed

void        user_function                  (GtkCellRendererText
*cellrenderertext,
                                            gchar *arg1,
                                            gchar *arg2,
                                            gpointer user_data);

Regards,
Naim


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