Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

LMDEditView Prevent scroll past EOL?

How can I prevent scrolling when making a text selection or scrolling past the end of line with a text selection?

I'm not sure what's going on but the horizontal scrollbars for me are behaving kinda odd, the horizontal scrollbar just keeps growing and growing when dragging the mouse with a text selection.

I noticed MaxHorizScroll property which is 500 by default but even setting it lower it behaves strange.

Additionally, how could we calculate the optimal HorizScroll? I imagine we need to get the longest line in the document?
Tagged:

Comments

  • 1 Comment sorted by Votes Date Added
  • How can I prevent scrolling when making a text selection or scrolling past the end of line with a text selection?

    It works like in Delphi, and there are no ways to achieve this.

    I noticed MaxHorizScroll property which is 500 by default but even setting it lower it behaves strange.

    You right, I can confirm scrolling over the MaxHorizScroll value. I will try to fix it.

    Additionally, how could we calculate the optimal HorizScroll? I imagine we need to get the longest line in the document?

    You can, of course, calculate the longest line, and it may be a good strategy for your own particular use case, but generally just keeping this number big, like in Delphi, imho more preferable.
Sign In or Register to comment.