Text ellipsis (in CLabel and other) [message #1284219] |
Fri, 04 April 2014 04:12  |
Eclipse User |
|
|
|
Hi,
SWT CLabel does ellipsis when text is too long to fit in the widget size. This behavior does not work in RWT.
More generally it would be nice to have a way to enable text ellipsis on widgets even if it's not supported by SWT.
Ellipsis would make sense on most read-only widgets: Label, Buttons, CTabItem, TabItem, Column Headers, Tree/Table cell...
This can be partially worked around on server side by calling computeSize with different text values and see when the result fit in the final size we want to use.
However this is very inefficient, generates a lot of TextSizeDetermination queries and we end up seeing the different iteration on client.
So the questions are:
* Is there a way to enable browser builtin ellipsis support for some div ( white-space : nowrap;text-overflow:ellipsis) styles using theming/RemoteScripting?
* Is there a plan to support ellipsis out of the box?
Regards,
-Seb
|
|
|
Re: Text ellipsis (in CLabel and other) [message #1284555 is a reply to message #1284219] |
Fri, 04 April 2014 12:01   |
Eclipse User |
|
|
|
Hi.
Yes and yes.
Ellipsis are already supported on Row Templates, and we had it planned
for 2.3, but it's currently unclear if it will happen. We also have a
bug for it: https://bugs.eclipse.org/bugs/show_bug.cgi?id=429894
You can certainly add browser-native CSS (bypassing the RAP theming) to
enable this for ALL divs. To do so you must add the CSS in a style tag
to the applications HEAD_HTML:
http://eclipse.org/rap/developers-guide/devguide.php?topic=application-configuration.html
(This only has an example for BODY_HTML, but HEAD_HTML is the same).
Greetings,
Tim
Am 04.04.2014 10:12, schrieb Sebastien Arod:
> Hi,
>
> SWT CLabel does ellipsis when text is too long to fit in the widget
> size. This behavior does not work in RWT.
>
> More generally it would be nice to have a way to enable text ellipsis on
> widgets even if it's not supported by SWT.
> Ellipsis would make sense on most read-only widgets: Label, Buttons,
> CTabItem, TabItem, Column Headers, Tree/Table cell...
>
> This can be partially worked around on server side by calling
> computeSize with different text values and see when the result fit in
> the final size we want to use.
> However this is very inefficient, generates a lot of
> TextSizeDetermination queries and we end up seeing the different
> iteration on client.
>
> So the questions are:
> * Is there a way to enable browser builtin ellipsis support for some div
> ( white-space : nowrap;text-overflow:ellipsis) styles using
> theming/RemoteScripting?
> * Is there a plan to support ellipsis out of the box?
> Regards,
> -Seb
>
--
Tim Buschtöns
Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/
Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
|
|
|
|
Powered by
FUDForum. Page generated in 0.04668 seconds