Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Scrolling text in Vaadin?
Hi guys,
I need to do the Scroll the text contained label. I don't know how to do this.
Please give any suggestion to do this? or any other easy way to do this?
My code is bellow :
String incomingUpdates ="Simple Marquee text";
Label notification_lbl = new Label();
notification_lbl.setValue(" New arrivals : "+incomingUpdates);
HorizontalLayout notification_hl = new HorizontalLayout();
notification_hl.addComponent(notification_lbl);
Thanks in Advance...!
You could try to use <marquee> tags like the following example:
Label notification_lbl = new Label();
notification_lbl.setContentMode(ContentMode.HTML);
notification_lbl.setValue("New arrivals: <marquee>" + incomingUpdates + "</marquee>");
But it's really not recommended: https://developer.mozilla.org/en/docs/Web/HTML/Element/marquee
The <marquee> element is obsolete and must not be used.
While some browsers still support it, it's not required.
In addition, using this element is basically one of the
worst things you can do to your users, so please, please don't do it.
-Olli
Olli Tietäväinen: You could try to use <marquee> tags like the following example:
Label notification_lbl = new Label(); notification_lbl.setContentMode(ContentMode.HTML); notification_lbl.setValue("New arrivals: <marquee>" + incomingUpdates + "</marquee>");
But it's really not recommended: https://developer.mozilla.org/en/docs/Web/HTML/Element/marquee
The <marquee> element is obsolete and must not be used. While some browsers still support it, it's not required. In addition, using this element is basically one of the worst things you can do to your users, so please, please don't do it.
-Olli
Thanks Olli... You saved me. Its working..
Thanks again.
OMG! Chrome still supports the marquee-tag! blink doesn't work, though