You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by Yunlong Zhao <Yu...@ingres.com> on 2010/08/19 18:00:37 UTC

Repaint a treeview inside a scrollpane

Hi All,

 

I have a treeview inside a scrollpane. In a button pressed event, I call
a method to do some data processing that takes between 2 to 5 seconds
for each branch and then add tree nodes to that branch and set new icon,
repaint the treeview. I have tried repaint() method on the treeview and
scrollpane after processing each branch but the treeview doesn't get
repainted until the method/event finished. How can I repaint the
treeview?

 

Thanks,

 

Yunlong Zhao

 


Re: Repaint a treeview inside a scrollpane

Posted by Greg Brown <gk...@mac.com>.
You'll want to execute the long-running operation on a background thread. See the Background Tasks tutorial for an example of how to do this:

http://pivot.apache.org/tutorials/background-tasks.html


On Aug 19, 2010, at 12:00 PM, Yunlong Zhao wrote:

> Hi All,
>  
> I have a treeview inside a scrollpane. In a button pressed event, I call a method to do some data processing that takes between 2 to 5 seconds for each branch and then add tree nodes to that branch and set new icon, repaint the treeview. I have tried repaint() method on the treeview and scrollpane after processing each branch but the treeview doesn’t get repainted until the method/event finished. How can I repaint the treeview?
>  
> Thanks,
>  
> Yunlong Zhao
>