Jumping scrollbar in ExplorerListGadget

Just starting out? Need help? Post your questions and find answers here.
Marvi
User
User
Posts: 17
Joined: Fri Oct 03, 2008 6:02 pm
Location: Milano

Jumping scrollbar in ExplorerListGadget

Post 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?
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post 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.
I may look like a mule, but I'm not a complete ass.
Marvi
User
User
Posts: 17
Joined: Fri Oct 03, 2008 6:02 pm
Location: Milano

Post by Marvi »

Nothing changes :cry:
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Post 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.
I may look like a mule, but I'm not a complete ass.
Post Reply