Re: GtkCellRendererText wrap with ellipsize and sizing
- From: Wesley Smith <wesley hoke gmail com>
- To: Piñeiro <apinheiro igalia com>
- Cc: gtk-list gnome org
- Subject: Re: GtkCellRendererText wrap with ellipsize and sizing
- Date: Wed, 2 Sep 2009 10:49:03 -0700
That's a great idea! Lucky for me the text is static and short so
such expensive calculations won't be a big deal.
best,
wes
On Wed, Sep 2, 2009 at 4:26 AM, Piñeiro<apinheiro igalia com> wrote:
> From: Wesley Smith <wesley hoke gmail com>
>
>> Is there a way to have both wrapping and ellipses when rendering a
>> GtkCellRendererText? I want the cell to wrap the text for up to 2
>> lines and afterward show ellipses. Also, how can I get a callback
>> when the GtkCellRendererText is resized in order to properly adapt the
>> GtkCellRendererText wrap-width attribute?
>
> One way is set the ellipsize mode and just add a newline character on
> your text (ie: '\n'). The problem with this solution is that you need
> to compute the break point to do that.
>
> Also, with this solution you don't need of take care of the wrap-width
> attribute, as you are the one wrapping the line.
>
> ===
> API (apinheiro igalia com)
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]