Re: key-press-event event clears cell in treeview



dhk wrote:
I have a key-press-event connected to my treeview so a Tab can be used to navigate through the cells. It work well except that when the Tab is pressed it clear all the data in the cell. If I use the mouse to move to another cell the data remains.

My callback doesn't touch the data. All it does is get tree paths, columns, and then grabs focus and sets the cursor on a cell. None of that should clear the data in a cell . . . should it?

Does Anyone know of any reason for this?

Thanks,

dave
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

I've narrowed down the problem to a callback not getting called when the key-press-event event occurs. If I click off the field first the callback set the data with the "edited" event. Then I can go back to the field and tab off and the data remains.

What I think I need to do is call g_signal_emit_by_name() in the key-press-event event callback, but I haven't gotten it working yet. The prototype from the gtk documentation is: g_signal_emit_by_name(gpointer instance, const gchar *detailed_signal, ...);. Can some explain the parameter to this? I don't think I'm getting them right. I think the instance is my treeview or renderer. The detailed-signal is in the form of "signal-name::detail" which I know the signal is "edited" but what is the detail suppose to be?

Thanks,

dave





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