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
 SetViewXY doesn't affect scrollbar
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

aleatprog

139 Posts

Posted - Feb 25 2025 :  06:47:07  Show Profile  Reply
Hi,

(1) applying the help example code of TImageEnView.OnViewChange to ImageEnView1,
procedure TForm1.ImageEnView1ViewChange(Sender: TObject; Change: Integer);
begin
  ImageEnView2.LockUpdate();
  try
    ImageEnView2.SetViewXY(TImageEnView(Sender).ViewX, TImageEnView(Sender).ViewY);
  finally
    ImageEnView2.UnlockUpdate();
  end;
end;

(2) loading PDF documents in ImageEnView1 + ImageEnView2 and
(3) moving the scrollbar of ImageEnView1,
the two documents are correctly viewed in sync, but the scrollbar of ImageEnView2 doesn't move with the page (see image below). ImageEnView2.Update or ImageEnView2.Refresh don't update the scrollbar position.

What do I need to add to the code in order to sync the scrollbar position of ImageEnView2 with the document position of ImageEnView2?

Ale

Image: in red the two scrollbar positions after moving the scrollbar of ImageEnView1

xequte

38944 Posts

Posted - Feb 25 2025 :  15:37:43  Show Profile  Reply
Hi Ale

I'm not seeing that here. Your code works perfectly for me. Can you send me a very small demo that reproduces it.

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

aleatprog

139 Posts

Posted - Feb 26 2025 :  04:26:18  Show Profile  Reply
Hi Nigel,

creating a demo from scratch, I noticed that the malfunction is connected to the used UI style. On my machine, the above shown code works fine with the default Windows style; switching to a specific appearance (e.g. Project > Options > Application > Appearance > Windows10 Dark), the scrollbar behaviour changes.
Thus, by solely changing the appearance you should be able to reproduce the malfunction.

Ale
Go to Top of Page

xequte

38944 Posts

Posted - Feb 26 2025 :  23:05:54  Show Profile  Reply
Hi Ale

Please email me for the latest beta which updates themed scrollbars correctly.

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