[175] in The GTK GIMP ToolKit mailing list archive

home help back first fref pref prev next nref lref last post

[gtk-list] Truncated labels

daemon@ATHENA.MIT.EDU (E. Young)
Thu May 15 21:51:55 1997

Date: Fri, 16 May 1997 02:51:41 +0100 (BST)
From: "E. Young" <ey200@hermes.cam.ac.uk>
Reply-To: "E. Young" <ey200@hermes.cam.ac.uk>
To: gtk-list@redhat.com
In-Reply-To: <lzk9l0717v.fsf@huygens.cit.cornell.edu>
Resent-From: gtk-list@redhat.com

If Shawn wants some dumb questions for the FAQ, I've got masses... :)

Is it possible to get some text displayed which is truncated to fit inside
its allocation? Looking at the label source code, it would appear not...
If I use

label = gtk_label_new ("cataphrastic peanuts");
gtk_widget_set_usize (label, 50, 16);
gtk_widget_show (label);

Then the whole phrase is displayed, overrunning the boundaries of the
label's box and mangling any innocent nearby widgets. Calling usize() on a
box containing the label makes the label's requisition smaller than its
allocation, so nothing is drawn at all. Is there a workaround, or am I
doing something stupid?

Thanks, 

-Edwin

--
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null


home help back first fref pref prev next nref lref last post