2

Scenario: The customers have the ability to set an annotation to the PDF page. This is handled as a richtextbox object. There's a bug, however, that when the user is making an annotation and wants to scroll down manually (drag scrollbar down), that the annotation moves with it. I want to implement code that detects the scroll event, so that the annotation can be exited and placed properly before the program scrolls down/up.

What was to be a simple procedure, ended up in a not so simple venture, but I'm getting used to that evolution in programming... We can see the WM_VSCROLL message with spy++, but can't find it with a Console.Writeline in wmdproc, which points to it being handled by an event, but for the life of us, we can't find which event exactly.

We tried overriding our mistery scroll event in both the MainForm as its parent, but no success. Also tried overriding it in the PDFViewCtrl, but it forbids us to override there. So we're kind of at a loss here. We know the event is handled, we just can't find where. We use Pdftron and DevExpress, but it's worth noting that we do not use their DE's PDFViewer. Ours is a PDFViewCtrl loaded into a DevExpress Xtraform.

Silvio Langereis
  • 487
  • 1
  • 11
  • 20
  • "so that the annotation can be exited and placed properly before the program scrolls down/up." Could you clarify why this is important for you? Is it not being placed properly when the user does scroll? – Ryan Apr 26 '17 at 19:51
  • No, the focus remains on the annotation when the user scrolls. One can click anywhere he wants to lose focus (thus placing the annotation),, but not on the scrollbar. What happens is that the annotation slides down with the scrolling, because it tries to maintain its appointed coords. – Silvio Langereis Apr 26 '17 at 20:10

1 Answers1

1

The annotation scrolling is the expected behaviour. Triggering the lost focus event when clicking on the scroll bars is not possible with the PDFViewCtrl class.

Ryan
  • 2,473
  • 1
  • 11
  • 14