Re: Re: Editable Label Widget

My problem with using a GtkEntry is that I need the label to be
multi-lined. I don't want to use GtkCellView because, when I edit
the text, it will resize the widget. It is possible to have hundreds
of these widgets in a column, so that would be a rendering mess.

I had originally used the idea of switching between a GtkLabel and
GtkEntry. There are a few problems with this. First, you still have the
resizing issues. The user can't see the whole text when it is in a
GtkEntry, so it will be difficult to edit longer texts. Also, you have to
keep two widgets around, which takes more memory.

I had created a very bad implementation of the GtkEditableLabel
widget that just resets the text on user input, but this is obviously
not the optimal solution. Plus, I am looking at creating something
that would be more versitile, and not depend directly on my
specific application.

Anyway, I'm leaning toward just creating a new widget so that I
don't have to deal with the selection info. This will allow me to reuse
some of the EelEditableLabel code. (BTW ... hello Ana!)

On Wed, 16 May 2007 14:39:19 -0700 Ana wrote:
I think making the GtkEntry look like a label is a good idea, but
be more work than you'd expect. It seems that whenever you mess with a
widget's appearance you have to worry about interfering with themes.
Who knows what other issues there might be.

Another idea might be to make a composite object, which subclasses from
a container (GtkBox), and works sort of like a modal editor. (hehe.
I'm a vi user.) You display either a GtkLabel or a GtkEntry depending
on the "mode."

- Ana

On Wed, May 16, 2007 at 07:00:10PM +0200, Hans Oesterholt-Dijkema wrote:
> Why not use a GtkEntry and make it look like a GtkLabel?
> You could also have a look at GtkCellView.

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