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
 ImageEnView unfocused scrolling

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
mdgodfrey Posted - Mar 22 2024 : 14:12:23
I am using the PDFViewer Demo trying to understand why scrolling of an unfocused ImageEnView component. I have added a fileListbox and a wwdbGrid to the form.

I run the program and load a PDF then check the 'Show all Pages' check box.

Then, if I click on the FileListBox and move the mouse over ImageEnview it scrolls very nicely.
When I click on the wwDBGrid and move the mouse over the ImageEnView it will not scroll. Clicking on the ImageEnView does implement scrolling of course, but hoping to not have to do that.

Any suggestions on that would be appreciated.
13   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Apr 11 2024 : 05:41:23
Nice work

Nigel
Xequte Software
www.imageen.com
mdgodfrey Posted - Apr 10 2024 : 20:59:31
Thanks for the code but...
The 'Direction' variable coding was not shown. But changing the first lines fixed it for me.
I did this:

Direction := WheelDelta div 100; // maybe just needed + or - 1
nPos := ImageEnView1.ViewY - Direction * ImageEnView1.MouseWheelParams.Value;


As far as weird behavior I am using other third party tools on this form. The stringgrid mocked part of the problem but not all.
So I assume something else is chewing it up.


Thanks
xequte Posted - Apr 09 2024 : 23:23:58
Hi

We seem to be seeing different things. You are seeing TImageEnView.OnMouseWheel events, whereas I do not. If TImageEnView.OnMouseWheel is occurring then the internal scrolling code should also occur. So I cannot understand what is occuring.

I cannot create a situation where TImageEnView has focus and scrolling does not occur.

You might want to try putting a breakpoint in the TImageEnView.DoWMMouseWheel method (I would expect it does not fire in this situation).

If your OnMouseWheel does fire you could try explicitly performing the scroll, which would be something like:

  nPos := ImageEnView1.ViewY + Direction * ImageEnView1.MouseWheelParams.Value;
  ImageEnView1.ViewY := nPos;
  ImageEnView1.PdfViewer.SetPageToScrollPos( Direction >= 0 );


Nigel
Xequte Software
www.imageen.com
mdgodfrey Posted - Apr 08 2024 : 17:38:49
So even when ImageEnView has focus it won't scroll with the MouseWheel.
The OnMouseWheel is firing so I could move it with code but I can't narrow down the correct way to do that.
Or even if some other component has focus I could intercept and scroll the PDF.

Any suggestions?
I've tried ImnageEnView.ScrollBy but that doesn't seem to do much. I've tried Perform. That moves it but is not predictable for me. PDFViewer has a few things but mostly seem to just moving to a new page.

Thanks
xequte Posted - Apr 05 2024 : 01:20:59
Hi

I fired up Delphi 2007. As expected the mouse wheel calls are being swallowed by TStringList if it is the active control (even though it isn't under the cursor).

Also, as expected, I'm not seeing ImageEnView1MouseWheel events in this situation. This means that there is no workaround while TStringList has focus. So your only solution is to give focus to the ImageEnView:

ImageEnView1.SetFocus();

(Or upgrade your Delphi version )

Nigel
Xequte Software
www.imageen.com
mdgodfrey Posted - Apr 04 2024 : 09:36:29
Yes. Even with focus it won't scroll.
xequte Posted - Apr 03 2024 : 15:44:17
Hi

Are you saying that the ImageEnView1MouseWheel event is still occurring in this situation when it is not scrolling?

Nigel
Xequte Software
www.imageen.com
mdgodfrey Posted - Apr 01 2024 : 17:20:25
Since something is stealing the Mousewheel scroll from the ImageEnView do you have a suggestion on how I can scroll with code.
I have tried attempts with ImageEnView1.Perform on ImageEnView1MouseWheel but that seems to just want to move the entire page so far.
xequte Posted - Mar 30 2024 : 17:31:47
Sorry, I don't see that in Delphi 12. I expect the "Focused" TStringList is swallowing the mouse wheel calls. Presumably it was an issue that have been fixed by Embarcadero.

Nigel
Xequte Software
www.imageen.com
xequte Posted - Mar 25 2024 : 23:32:11
Thanks. I will try and reproduce that here.

Nigel
Xequte Software
www.imageen.com
mdgodfrey Posted - Mar 25 2024 : 12:43:12
To clarify, I have NOT tried this behavior on a more current version of Delph2007 so far.
mdgodfrey Posted - Mar 25 2024 : 11:37:49
Yes, it happens if I use a TStringGrid. One other caveat is that I am using the on Delphi2007 at the moment.
Have tried this behavior on anything more current yet.
xequte Posted - Mar 22 2024 : 22:24:05
Hi

Are you able to reproduce without third party components so I can reproduce it here?

Nigel
Xequte Software
www.imageen.com