Re: Label resizing window, ellipsizing
- From: Tristan Van Berkom <tvb gnome org>
- To: David Gomes <davidrafagomes gmail com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Label resizing window, ellipsizing
- Date: Tue, 3 Jan 2012 15:34:31 +0900
Try setting "width-chars" property as well as "max-width-chars" property.
GtkLabel apis could use a face-lift. It's possible that the default minimum
width request exceeds the 10 max-width-chars which you set (which is
what I assume is causing this problem).
Cheers,
-Tristan
On Fri, Dec 9, 2011 at 1:39 AM, David Gomes <davidrafagomes gmail com> wrote:
Hello there,
I was wondering if there was a way of avoiding a label (in a notebook)
to resize the window when the text in it is too big.
I heard of ellipsizing, and EllipsizeMode.END seems great for me, but
if I ellipsize it, it will be ellipsized even if the label is small.
So, I want to ellipsize it only when it becomes too big (over X
pixels), but I only seem to be able to limit it's width in chars using
max_width_chars. I also tried setting my label's max_width_chars to
10, but the string could still increase a lot, so it didn't work.
What do you recommend? Ideally, I would like to have a maximum width
in pixels, but chars is ok too.
/* Relevant code (vala) */
tab.label.max_width_chars = 10;
--
David Gomes
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]