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
 OnImageSelect - problem
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

graphman

259 Posts

Posted - Jan 16 2013 :  12:22:48  Show Profile  Reply
I have used previous version of the ImageEn
and now (in the latest version) you have changed the algorithm of this event.

I have ImageEnMView and ImageEnView
select thumbnail in ImageEnMView -> OnImageSelect
-> Load required page from multipage file into ImageEnView
If I select onlu one page - all is OK
If I need to select several pages:
a) old version of imageen - only first and last selected images
coused event OnImageSelect
2) new version of imageen - all selected images coused event OnImageSelect
It leads to unnecessary loading of intermediate pages.
It brakes program work at a great number of the chosen pages.

How to fix it?

graphman

259 Posts

Posted - Jan 16 2013 :  12:45:04  Show Profile  Reply
And TImageEnMView.SelectedImage earlier did not change at multipage selection
Go to Top of Page

xequte

38610 Posts

Posted - Jan 16 2013 :  13:05:30  Show Profile  Reply
Hi

OnImageSelect should be called once for every thumb that is selected.

Why not just use idx parameter of the event to determine which frame it is being called for.

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

graphman

259 Posts

Posted - Jan 16 2013 :  14:02:04  Show Profile  Reply
For every OnImageSelect I see different idx and different TImageEnMView.SelectedImage

Please describe your idea
Go to Top of Page

xequte

38610 Posts

Posted - Jan 17 2013 :  14:06:27  Show Profile  Reply
If you select all items in a TImageEnMView then OnImageSelect will be called once for each item (with a different idx naturally). This is the correct behaviour.

Please tell us more about your code. If you just want to load the selected image, then perhaps you should use the OnClick event or delay the loading for 1/4 second after user action.





Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

graphman

259 Posts

Posted - Jan 25 2013 :  12:50:22  Show Profile  Reply
OnClick doesn't working if I select any page in the TImageEnMView.
Why?
Go to Top of Page

fab

1310 Posts

Posted - Jan 28 2013 :  04:17:24  Show Profile  Reply
In my tests OnClick works in TImageEnMView, with both multiselect and single select. Please recheck, or let me know more details to replicate it.
Go to Top of Page

graphman

259 Posts

Posted - Jan 28 2013 :  04:31:24  Show Profile  Reply
I see OnClick event ONLY
- if TImageEnMView is empty
- if I click already selected page in the TImageEnMView
Go to Top of Page

graphman

259 Posts

Posted - Jan 28 2013 :  07:30:35  Show Profile  Reply
Strange, but now it works
Thanks
Go to Top of Page

graphman

259 Posts

Posted - Jan 28 2013 :  07:35:10  Show Profile  Reply
after removing breakpoint in ImageEnMView2ImageSelect
Go to Top of Page

graphman

259 Posts

Posted - Jan 28 2013 :  07:46:36  Show Profile  Reply
What is selected page in OnClick event?
ImageEnMView2->SelectedImage ???

BUT
If I have 6 pages
Click 1st - OK
hold shift
click 6 - OK
NOW
click 1st and see
ImageEnMView2->SelectedImage = 6, not 1
Go to Top of Page

fab

1310 Posts

Posted - Jan 28 2013 :  08:20:28  Show Profile  Reply
OnClick (and OnMouseUp) occurs before ImageEn can handle the event, so SelectedImage (and MultiSelectedImages) has still the previous state.
It could be useful to add new event, just before the end of MouseUp of TImageEnMView (ie OnAfterMouseUp?), but, please explain, what kind of time intensive operation are you going to execute whenever an image is selected?
Go to Top of Page

graphman

259 Posts

Posted - Jan 28 2013 :  09:19:15  Show Profile  Reply
> It could be useful to add new event, just before the end of MouseUp of TImageEnMView (ie OnAfterMouseUp?),

Thanks. It will be great.

> please explain, what kind of time intensive operation are you going to execute whenever an image is selected?

I need to get Page number from ImageEnMView
and load image to ImageEnView from multipage file.
Go to Top of Page

fab

1310 Posts

Posted - Feb 01 2013 :  02:34:24  Show Profile  Reply
Next minor version will have a way to handle some events just after ImageEn has processed them.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: