[gtk-list] Truncated labels



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



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