Hello, I would like to force a Label to redraw at a specific time.
How this could be done?
I am trying the following code, but still the Label redraw itself at the end of the loop.
I would like to see each one of the numbers...
Any ideas?
Thank you again
Yorgos Tryfon.
How this could be done?
I am trying the following code, but still the Label redraw itself at the end of the loop.
I would like to see each one of the numbers...
Code:
public class MainEntryPoint implements EntryPoint { private VLayout v; private Label label; public void onModuleLoad () { v = new VLayout (); label = new Label ("hello"); v.addMember (label); Button btn = new Button ("test redraw"); btn.addClickHandler (new ClickHandler () { public void onClick (ClickEvent event) { onTest (); } }); v.addMember (btn); v.draw (); } public void onTest () { for (int i=0; i<500; i++) { label.setContents (""+i); label.markForRedraw (); v.reflowNow (); label.redraw (); v.redraw (); } } }
Thank you again
Yorgos Tryfon.
Comment