ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Prevent TImageEnFolderMView from scrolling
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

zerob

177 Posts

Posted - Feb 07 2021 :  10:48:54  Show Profile  Reply
Is it possible to prevent a TImageEnFolderMView from scrolling down when adding new images with FillFromDirectory or adding them manually?

Having it scroll down, load the images there and then wait for a "AllDisplayed" event to do a "ViewY := 0" doesn't look that nice and loads images that don't need to be loaded yet as the ViewY should be 0.

I want my TImageEnFolderMView to start from top like the normal expected mode of windows lists like in the explorer or other tools.

xequte

38682 Posts

Posted - Feb 07 2021 :  15:37:45  Show Profile  Reply
Hi

You should lock the update when batch adding and then reset the position:

http://www.imageen.com/help/TImageEnMView.LockUpdate.html

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

zerob

177 Posts

Posted - Feb 07 2021 :  15:50:41  Show Profile  Reply
But how do i know when all files got loaded when i load them with FillFromDirectory(....LoadOnDemand = True....);

Right now i do wait for OnAllDisplayed and then scroll up with ViewY := 0

If i do a LockUpdate, then im unable to find out if tho know when to scroll up or do UnlockUpdate.

Right now if i do a Load FillFromDirectory(....LoadOnDemand = True....); it scrolls down, displays the images in view and then fires OnAllDisplayed. So i can scroll up.

But i don't want it to scroll down and load display the bottom most images but stay at top or scroll to top and only load these images (until the user scrolls down himself).
Go to Top of Page

xequte

38682 Posts

Posted - Feb 07 2021 :  16:13:57  Show Profile  Reply
Hi

It should not be necessary to wait for OnAllDisplayed. You should be able to use:

IEMView1.LockUpdate();
IEMView1.FillFromDirectory();
IEMView1.SelectedImage := 0;
IEMView1.UnlockUpdate();


Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: