|
|
|
|
Re: Label text is initially truncated [message #1145979 is a reply to message #1145058] |
Sat, 19 October 2013 18:51  |
Eclipse User |
|
|
|
Hi Ivan,
Awesome. Adding the resize listener does the trick and the same code works nicely in both RAP and RCP.
Thanks very much,
Marcel
Ivan Furnadjiev wrote on Sat, 19 October 2013 21:14Hi Marcel,
the common workaround is to add a resize listener to the widget and do
your logic there. When widget is created, its bounds are estimated,
based on text size estimation. With the next request from the client (it
happens automatically if there are text for measuring) the layout will
be triggered and the widget bounds will be automatically adjusted to the
real text size. No need to reload the application.
Best,
Ivan
On 10/19/2013 3:00 AM, M Küng wrote:
> Hi Ivan,
>
> Thanks for the quick response. That does indeed explain why it's
> happening but it doesn't explain how to work around the issue.
>
> It there an elegant way to force the re-layout to happen without
> requiring the user to refresh the page in the browser?
>
> I tried calling layout(true, true) on the parent Composite but that
> doesn't work and I can see that the TSD code is simply returning the
> last value it cached rather then updating the cached value.
>
> Thanks,
>
> Marcel
|
|
|
Powered by
FUDForum. Page generated in 0.04242 seconds