Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Text ellipsis (in CLabel and other)
Text ellipsis (in CLabel and other) [message #1284219] Fri, 04 April 2014 08:12 Go to next message
Sebastien Arod is currently offline Sebastien ArodFriend
Messages: 41
Registered: July 2009
Member
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 16:01 Go to previous messageGo to next message
Tim Buschtoens is currently offline Tim BuschtoensFriend
Messages: 396
Registered: July 2009
Senior Member
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/
Re: Text ellipsis (in CLabel and other) [message #1285148 is a reply to message #1284555] Sat, 05 April 2014 07:42 Go to previous message
Sebastien Arod is currently offline Sebastien ArodFriend
Messages: 41
Registered: July 2009
Member
Hi Tim,

Thanks for the reply. That's good news I'll try this ASAP.

Regards,
-Seb
Previous Topic:Not able to propagate JAAS Subject
Goto Forum:
  


Current Time: Fri Mar 29 05:26:57 GMT 2024

Powered by FUDForum. Page generated in 0.05163 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top