Re: Re: Editable Label Widget
- From: "ANDREW JAMES KRAUSE" <ajk265 psu edu>
- To: Hans Oesterholt-Dijkema <hdnews gawab com>
- Cc: gtk-list gnome org
- Subject: Re: Re: Editable Label Widget
- Date: Thu, 17 May 2007 10:18:31 -0400
Ok, GtkTextView would work if I had only one of these. However,
I have
possibly hundreds of these in one application. That is just
way too much
overhead.
On Thu, 17 May 2007 08:19:32 +0200 Hans Oesterholt-Dijkema wrote:
What about GtkTextView? If it is in 'disabled' state, it will by
default grey out (and look much like a label). If you enable it,
you can edit text with it. This widget will also resize on editing
though, but you can wrap words and add a scrolled window.
--Hans
ANDREW JAMES KRAUSE schreef:
> 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
> might
> 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.
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
>
---
Andrew Krause
ajk265 psu edu
www.andrewkrause.net
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]