Re: Need widget to edit label text



The Surprises wrote:
> Before I dive into coding one, does anyone have any code that allows one
> to edit the text of a label widget?  The user can double click on the
> label, and it will magically convert to a text entry that the user can
> edit, then when the user hits return, it magically turns back into a
> label.

Hi, I do this in my app:

http://www.vips.ecs.soton.ac.uk/

I have a table, with a cell containing a frame and the frame containing a
label. 
On a click, I make an entry attached to the same cell, show it, and hide the

frame. I also fill the entry with the label text,
gtk_editable_select_region() 
to select it all, and gtk_widget_grab_focus().

John



========================================================== 

Madame de Pompadour 
Images of a Mistress 

16 October 2002 - 12 January 2003 

For information and tickets: 
http://www.nationalgallery.org.uk/exhibitions/pompadour/default.htm



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