Re: multi line cell edition



On Thu, Feb 3, 2011 at 8:54 PM, Nicolas Soubeiran
<nicolas soubeiran gmail com> wrote:
Hi all, I need to edit a "multi-line" cell in a treeview.
GtkCellRendererText can display a "multi-line" text, I need to be able
to edit it and/or let the user set a multi line value in the cell.
I look at GtkEntry APIs and I found gtk_entry_get_layout* API but I
have no idea on how I can use it. Or have I to create a custom widget?
How can I do this? I'm working on a GTK+ 2.18 version (RedHat 6)

Generally I do that by popping up a dialog for anything editing of
multi-line text from a treeview.

GtkCellRendererText uses a GtkEntry and finishes the editing by way
of the ENTER key (or cancels it by way of ESC key)... you could theoretically
write your own GtkCellRendererText derived renderer that uses a
derived GtkTextView to implement GtkCellEditable... but... if you did
that I'm not sure it would be a good user experience (i.e. how would
the user indicate that they finished editing the cell ?, you would have
to put a button in there or something ?).

In the end I recommend using a dialog that pops up from the treeview
to edit multi-line text.

Cheers,
         -Tristan



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