Sign in to follow this  
Followers 0
Demonic

Treeview Updating

5 posts in this topic

I was wondering hpw to constantly update a treeview with new information that is retrived from a file. some of the data will stay that same but uhm simply be moved to a different section of the treeview. so how do i delete everything in the treeview and re add it(without major flicker).

Share this post


Link to post
Share on other sites



I was wondering hpw to constantly update a treeview with new information that is retrived from a file. some of the data will stay that same but uhm simply be moved to a different section of the treeview. so how do i delete everything in the treeview and re add it(without major flicker).

Use _GUICtrlTreeView_BeginUpdate() before starting your update, then _GUICtrlTreeView_EndUpdate() after it's done. The display of the control will not be refreshed while new data is put in, so no flicker.

:P


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

the same data may be added more than once and is updated every 3 seconds so if i do not first delete the data the same data is put on the list twice, and if i delete all data the section collapses(anoying to have ti close every 3 seconds) so i have it re expand but it gives a flickeryish effect.

Share this post


Link to post
Share on other sites

the same data may be added more than once and is updated every 3 seconds so if i do not first delete the data the same data is put on the list twice, and if i delete all data the section collapses(anoying to have ti close every 3 seconds) so i have it re expand but it gives a flickeryish effect.

Too much talk, not enough code.

The text of treeview nodes can be changed without deleting them by _GUICtrlTreeView_SetText(). The logic of your loop should prevent adding multiple instances of nodes that already exist, and should prevent any update at all if nothing has changed. You have a logic issue with your update process.

Post a short reproducer script that creates a treeview with your options, and the update loop, so we can see what you are doing.

:P


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

the same data may be added more than once and is updated every 3 seconds so if i do not first delete the data the same data is put on the list twice, and if i delete all data the section collapses(anoying to have ti close every 3 seconds) so i have it re expand but it gives a flickeryish effect.

Look at _GUICtrlTreeView_Expand()

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0