Page 1 of 1

Jumping scrollbar in ExplorerListGadget

Posted: Sat Nov 22, 2008 12:08 pm
by Marvi
When my program deletes files in a folder, the ExploreListGadget
pointing to that folder gets crazy, showing anymore files and ExploreListGadget scrollbar jumps up and down till last file is deleted.

How can I freeze that window till end of operation?

Posted: Sat Nov 22, 2008 12:23 pm
by srod
Try using the #WM_SETREDRAW message on the explorer list before starting the deletion and then use again after finishing.

Just don't forget to invalidate the gadget's client area (InvalidateRect_()) once you reset the redraw flag.

Use :

Code: Select all

SendMessage_(GadgetID(#myList), #WM_SETREDRAW, 0, 0)
before the deletions, and use

Code: Select all

SendMessage_(GadgetID(#myList), #WM_SETREDRAW, 1, 0)
InvalidateRect_(GadgetID(#myList), 0, 1)
afterwards.

Posted: Sat Nov 22, 2008 12:46 pm
by Marvi
Nothing changes :cry:

Posted: Sat Nov 22, 2008 1:03 pm
by srod
Probably due to some latency resulting from deleting the files and the explorer list being updated etc.

Try inserting a largeish delay just before resetting the redraw flag - just as a test like.