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

jeffp

USA
58 Posts

Posted - Dec 03 2024 :  18:09:39  Show Profile  Reply


When using

ImageEnMView1.AttachedImageEnView := ImageEnView1

Should the file be loaded using ImageEnMView1 or ImageEnView1

When loading using ImageEnMView1, the navigation doesn't work on page 1. You CANNOT MouseWheel back to page 1 once you've left it.

jp

xequte

38682 Posts

Posted - Dec 03 2024 :  18:35:03  Show Profile  Reply
Hi Jeff

I'm not seeing that. Try adding this code:

  // Mouse wheel scrolls through the images (with secondary actions if Ctrl is pressed)
  ImageEnView1.MouseWheelParams.Action := iemwNavigate;
  ImageEnView1.MouseWheelParamsAlt.Action := iemwZoom;
  IEFolderMView.MouseWheelParams.Action := iemwNavigate;
  IEFolderMView.MouseWheelParamsAlt.Action := iemwVScroll;


To the demo:
\Demos\Multi\MView_AttachedViewer\MViewPreview.dpr

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

jeffp

USA
58 Posts

Posted - Dec 03 2024 :  18:59:01  Show Profile  Reply
Should the file be loaded using ImageEnMView1 or ImageEnView1?

jp
Go to Top of Page

xequte

38682 Posts

Posted - Dec 04 2024 :  00:30:33  Show Profile  Reply
Hi

You should be loading it using ImageEnMView1.MIO.LoadFromFile();

(Except in the special case of PDF files).

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

jeffp

USA
58 Posts

Posted - Dec 04 2024 :  08:35:40  Show Profile  Reply
I'm still having an issue mouse wheeling back to the first page.


FViewer := TImageEnView.Create(AOwner);
FThumbs := TImageEnMView.Create(nil);
FThumbs.AttachedImageEnView := FViewer;

FViewer.MouseWheelParams.Action := iemwNavigate;
FViewer.MouseWheelParamsAlt.Action := iemwZoom;
FThumbs.MouseWheelParams.Action := iemwNavigate;
FThumbs.MouseWheelParamsAlt.Action := iemwVScroll;


I loads with page 1 displaying in the Viewer, but then when I mouse wheel down to page 2 and then back to page 1 the Viewer still displays page 2, but the Thumbs pane does select page 1.

So page 1 gets selected in the thumbs pane, but the does NOT get loaded in the Viewer.

By the way, I'm loading a multi-page TIF file. It works fine when I load a PDF.

Go to Top of Page

xequte

38682 Posts

Posted - Dec 04 2024 :  20:08:41  Show Profile  Reply
Hi Jeff

I added this code to a new form:

procedure TForm1.Button2Click(Sender: TObject);
var
  FViewer : TImageEnView;
  FThumbs : TImageEnMView;
begin
  FThumbs := TImageEnMView.Create(Self);
  FThumbs.Parent := Self;
  FThumbs.Width := 500;
  FThumbs.Align := alLeft;

  FViewer := TImageEnView.Create(Self);
  FViewer.Parent := Self;
  FViewer.Align := alClient;
  FViewer.AutoShrink := True;

  FThumbs.AttachedImageEnView := FViewer;

  FViewer.MouseWheelParams.Action := iemwNavigate;
  FViewer.MouseWheelParamsAlt.Action := iemwZoom;
  FThumbs.MouseWheelParams.Action := iemwNavigate;
  FThumbs.MouseWheelParamsAlt.Action := iemwVScroll;

  FThumbs.MIO.LoadFromFile('D:\TIFF\MM color&bw__4pages.tif');
end;

Whether I mouse over the thumb control or the viewer it works as expected.

Can you test the attached project.

What version of Delphi are you using?


attach/xequte/202412420835_MouseWheel.zip
1.86 KB

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

jeffp

USA
58 Posts

Posted - Dec 05 2024 :  10:32:42  Show Profile  Reply
Found the issue. Just add

FThumbs.StoreType := ietFastThumb;

Before loading the file. With this set, you can't scroll back to page 1.



jp
Go to Top of Page

xequte

38682 Posts

Posted - Dec 05 2024 :  19:15:57  Show Profile  Reply
Thanks Jeff,

We've fixed this in the latest beta.

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

jeffp

USA
58 Posts

Posted - Dec 05 2024 :  19:49:47  Show Profile  Reply
This was tested on the beta you sent me yesterday. Do you have another update?


jp
Go to Top of Page

xequte

38682 Posts

Posted - Dec 05 2024 :  23:08:29  Show Profile  Reply
Hi Jeff

You need beta 1206, which I've just emailed you.

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

jeffp

USA
58 Posts

Posted - Dec 06 2024 :  09:21:59  Show Profile  Reply
Thanks

jp
Go to Top of Page

jeffp

USA
58 Posts

Posted - Dec 12 2024 :  10:49:10  Show Profile  Reply
Follow up.

When using FThumbs.AttachedImageEnView := FViewer;

is there a way to have the selected TThumbs image updated automatically whenever the user does an edit in FViewer? Similar when the user presses Undo to the edit in the FViewer.

I want the thumbnail in FThumbs to always reflect the state of the image loaded in FViewer.


If not auto way to do this on a FViewer.Undo then a OnAfterUndoRedo event would be helpful.


jp
Go to Top of Page

xequte

38682 Posts

Posted - Dec 15 2024 :  23:50:01  Show Profile  Reply
Hi Jeff

Sorry, that is not possible at this time. We will consider it for a future update.

Please see the event:

https://www.imageen.com/help/TImageEnView.OnUndoRedo.html

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

jeffp

USA
58 Posts

Posted - Dec 16 2024 :  15:55:32  Show Profile  Reply
Ok. But please add a new event OnAfterUndoRedo to a future release.


jp
Go to Top of Page

xequte

38682 Posts

Posted - Dec 16 2024 :  16:41:35  Show Profile  Reply
Hi Jeff

In the latest beta, you can check for iecsUndo in the TImageEnView.OnImageChangeEx event to detect changes due to undo/redo:

https://www.imageen.com/help/TImageEnView.OnImageChangeEx.html

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