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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 How to synchronize scrollbars in TImageEnView

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
AndyColmes Posted - Mar 13 2017 : 05:37:48
I am trying to synchronize 2 TImageEnView in zooming and scrolling. One of the issues that I am having is that sometimes the scrollbar position is not synchronized even after calling Invalidate for both TImageEnView, especially when one TImageEnView has a different scrollbar position. Is there a good way to make sure that the scrollbar position is synchronized in code without having to actually scroll with the scrollbar using the mouse to synchronize?

Thanks in advance.

Andy
2   L A T E S T    R E P L I E S    (Newest First)
AndyColmes Posted - Mar 16 2017 : 15:10:33
Thanks very much Bill. I will give that a try.

Andy
w2m Posted - Mar 13 2017 : 09:52:07
procedure TForm1.FormCreate(Sender: TObject);
begin
  ImageEnView1.Gestures.Pan.Enabled := True;
  ImageEnView1.Gestures.Zoom.Enabled := True;
  ImageEnView2.Gestures.Pan.Enabled := True;
  ImageEnView2.Gestures.Zoom.Enabled := True;
  ImageEnView1.IO.LoadFromFile('G:\Images\Microsoft\Monarch.jpg');
  ImageEnView2.IO.LoadFromFile('G:\Images\Microsoft\Monarch.jpg');
end;

procedure TForm1.ImageEnView1ViewChange(Sender: TObject; Change: Integer);
begin
  ImageEnView2.ViewX := ImageEnView1.ViewX;
  ImageEnView2.ViewY := ImageEnView1.ViewY;
end;

procedure TForm1.ImageEnView2ViewChange(Sender: TObject; Change: Integer);
begin
  ImageEnView1.ViewX := ImageEnView2.ViewX;
  ImageEnView1.ViewY := ImageEnView2.ViewY;
end;

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development