On 05/31/2011 03:06 PM, Maxime de Roucy wrote:
> What I want exactly is :
> When the text in the GtkLabel is too long (it exceeds the widget size),
> I want the text to get cut off by the edge of the widget. Instead of
> increasing automatically the size of the Widget (and so the whole
> window).

You can get label width with gtk_label_get_layout() and
pango_layout_get_pixel_size().

What you could do is making a little function to determine where the
text string must be cut off, depending on max width, sth like:

text length = 1
while (label width < max label width)
        text length ++

-- 
Emmanuel Thomas-Maurin <manutm...@gmail.com>
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to