problems with CellRenderers



Hi,

I'm making a new widget that would probably make sense for bug #119085
[1] and I having problems with cell renderers. Basically I'm trying to
do an editable TreeView. When the user moves to a cell it automatically
enters into edit mode.

So this I what I do:

1. Call gtk_cell_renderer_start_editing on the renderer of that column
with apropiate parameters

2. If I get a valid editable_widget (a GtkEntry since I'm using
GtkCellRendererText so far) I do the following:

 gtk_widget_set_parent_window(editable_widget, my_widget->window);
 gtk_widget_set_parent(editable_widget, my_widget);
 gtk_cell_editable_start_editing(editable_widget, NULL);  
 gtk_widget_grab_focus (editable_widget);


Then, the editable_widget is not shown on my widget. I supposed I need
to set an allocation for it and that's what i've done but then the
GtkEntry doesn't get the focus and I can't use it.

I've reading the GtkTreeView code extensively and I can't get how that
is done in that widget.

By the way, so far my Grid widget is using GtkListStore, CellRenderers
and an API very closed to the GtkTreeView. If you want to see my
progress I usually write about it here [2]

Any help is greatly appreciated

Lorenzo Gil


[1] http://bugzilla.gnome.org/show_bug.cgi?id=119085
[2] http://www.advogato.com/person/lgs/





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