Author |
Topic |
|
graphman
259 Posts |
Posted - Jan 16 2013 : 12:22:48
|
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
|
And TImageEnMView.SelectedImage earlier did not change at multipage selection |
|
|
xequte
38610 Posts |
Posted - Jan 16 2013 : 13:05:30
|
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
|
|
|
graphman
259 Posts |
Posted - Jan 16 2013 : 14:02:04
|
For every OnImageSelect I see different idx and different TImageEnMView.SelectedImage
Please describe your idea |
|
|
xequte
38610 Posts |
Posted - Jan 17 2013 : 14:06:27
|
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
|
|
|
graphman
259 Posts |
Posted - Jan 25 2013 : 12:50:22
|
OnClick doesn't working if I select any page in the TImageEnMView. Why? |
|
|
fab
1310 Posts |
Posted - Jan 28 2013 : 04:17:24
|
In my tests OnClick works in TImageEnMView, with both multiselect and single select. Please recheck, or let me know more details to replicate it. |
|
|
graphman
259 Posts |
Posted - Jan 28 2013 : 04:31:24
|
I see OnClick event ONLY - if TImageEnMView is empty - if I click already selected page in the TImageEnMView |
|
|
graphman
259 Posts |
Posted - Jan 28 2013 : 07:30:35
|
Strange, but now it works Thanks |
|
|
graphman
259 Posts |
Posted - Jan 28 2013 : 07:35:10
|
after removing breakpoint in ImageEnMView2ImageSelect |
|
|
graphman
259 Posts |
Posted - Jan 28 2013 : 07:46:36
|
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
|
|
|
fab
1310 Posts |
Posted - Jan 28 2013 : 08:20:28
|
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? |
|
|
graphman
259 Posts |
Posted - Jan 28 2013 : 09:19:15
|
> 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. |
|
|
fab
1310 Posts |
Posted - Feb 01 2013 : 02:34:24
|
Next minor version will have a way to handle some events just after ImageEn has processed them. |
|
|
|
Topic |
|