That one should  be easy to implement...

You could do something like this...

SimplePanel container = new SimplePanel();
container.getElement().getStyle().setOverflow(Style.Overflow.HIDDEN);

Label label = new Label("Text that you want to scroll");
label.getElement().getStyle().setPosition(Style.Position.ABSOLUTE);
container.add(label);

    private final Timer t = new Timer() { 
        @Override 
        public void run() { 
            
label.getElement().getStyle().setLeft(Integer.parseInt(label.getElement.getStyle().getLeft())
 
- 10, Unit.PX);
        } 
    }; 
    t.scheduleRepeating(100); 

This will move label to the left for 10px on every 100 miliseconds. So now 
in run() method just add math that is needed and that should be it.

PS. this might not work exactly as I typed it in, as I typed it in straight 
from my head without any checking, but the concept is valid.

Best,
Milan Cvejic

On Wednesday, November 14, 2012 9:24:31 PM UTC+1, Sridhar V wrote:
>
> Is it possible to create auto scroling text in GWT?  if so, please guide 
> me how to do that.
>
> please note that I am NOT referring to horizontal/vertical scroll bars. I 
> am talking the text that is scrolling in a box/nugget/widget.. etc
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/Fb_PEgjN7b0J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to