On Wed, May 16, 2007 at 06:19:30PM -0400, ANDREW JAMES KRAUSE wrote: > 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. Are you going for a WYSIWYG thing? I'm sure I can't help you much there. Another idea that occurs to me is creating a tiny, borderless pop-up window over the label that contains a single editable widget. The window and editable could be created afresh every time the user wants to edit a label (and destroyed after) so it wouldn't take additional memory per widget. Having it pop-up z-order-above the label/main-window would avoid the resizing issue. You could have this little window return any kind of text, perhaps pango markup (generated from parsed WYSIWYG text?). Or, when the window is instantiated, hand it a reference to the label being edited and have the update occur when the window closes or in real-time. You might even attach a little formatting tool-bar to one edge of this tiny window so people could easily mark portions of text bold, italic, etc.. One of the nicest bits of this is that you wouldn't have to create a new "label" widget at all and instead rely on the GtkLabel's existing strengths. You'd just connect whatever signals of the GtkLabel you need to begin the pop-up/editing. One of the major challenges, I think, would be getting the user to notice the tiny window and avoid confusion about what is going on; with this tiny modal "dialog." The tab, enter and/or escape keys would need to close the window. And, how would the user signal signal that s/he wants to edit the label? Perhaps editing could begin when the user gives an "editable label" the focus and presses Enter. ...just thinking "out loud" - Ana _______________________________________________ gtk-list mailing list gtk-list@xxxxxxxxx http://mail.gnome.org/mailman/listinfo/gtk-list