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
 Displaying ImageMView.MultiSelectedImagesCount?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

skippix

USA
68 Posts

Posted - Nov 19 2020 :  08:39:00  Show Profile  Reply
I'm probably overlooking something simple, but what events are best for updating a TLabel with an TImageMView's MultiSelectedImagesCount?

I need to do it when the user clicks on a thumbnail or navigates with the keyboard.

I'm trying OnImageSelect, but I'm not getting the correct number.


Thanks!

yogiyang

India
727 Posts

Posted - Dec 03 2020 :  06:54:38  Show Profile  Reply
Hello,

Try to put your code in OnMouseUp event.

HTH


Yogi Yang
Go to Top of Page

xequte

38610 Posts

Posted - Dec 04 2020 :  23:10:55  Show Profile  Reply
Also, we have added TImageEnMView.OnSelectionChanged in the upcoming version.

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

skippix

USA
68 Posts

Posted - Dec 12 2020 :  11:27:53  Show Profile  Reply
Thanks!

After poking around some more, I had a EUREKA! moment and discovered

OnAfterEvent

Not that I completely understand the entire TImageEnMView event cycle, but that seems to allow me to update my lblImageGridStatus without any noticeable overhead.

Just to share, here's the code I call:

procedure TfrmAssetCurator.ImgGridStatus;
var imgMV: TImageEnMView;
  s: String;
begin
  if (iNavGrid = 0) then
    imgMV := ImgMView
  else
    imgMV := ImgMViewTarget;

  s := IntToStr(imgMV.ImageCount) + ' files';

  if (imgMV.MultiSelectedImagesCount > 0) then
    s := s + ', ' + IntToStr(imgMV.MultiSelectedImagesCount) + ' selected';

  if (imgMV.CheckedCount > 0) then
    s := s + ', ' + IntToStr(imgMV.CheckedCount) + ' checked';

  Talk (lblImageGridStatus, s);
end;

Cheers,
Skip
Go to Top of Page

xequte

38610 Posts

Posted - Dec 13 2020 :  20:42:17  Show Profile  Reply
Thanks Skip

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