I have a textarea that is a code window where the user can enter code. On the left side of this textarea there is another textarea showing the line numbers. This is all working well. If not all entered code can be seen the user can of course scroll the textarea. I then have to synchronously scroll the other textarea with the line numbers.
The problem: textarea.VerticalScrollPosition returns the most top visible line number but not the pixel-perfect position. Setting this line number to the other textarea (showing current line number view) then there is a slight shift between both textareas. Well if I then also set the VerticalScrollPosition of the codearea I get them synced but then I have some flickering effects on scrolling the codearea.
Is there a solution where I can get them synced so they are always being at the precise same pixel-perfect vertical position? I also would be happy to be able to set the textarea (code) scrolling step to “line” but I couldn’t find a property for this.
Just saw that textarea.HorizontalScrollPosition is based on pixels while textarea.VerticalScrollPosition is based on lines! This is really weird.
Thank you this looks promising but I have no clue how to “install” this. Beside of tons of files there is an installation chapter not telling me what and how I have to download files (and install where). F.e. he is talking about a “CustomEditField folder” which I don’t have in Xojo. Furthermore I miss a proper manual (inside) and the code looks pretty old, not sure if it is working with latest Xojo releases on Mac, Win, Linux).
I don’t know about Linux and Windows. But I have the code working fine on Catalina with Xojo 2019r3. Download the zip file. Run the project. You probably need to copy most of the project items into your project.
[quote=480268:@Tanner Lee]FWIW, I get CGImage errors running in 19R3,1. I found just commenting out the offending routines in DragImage allows it to work (esp. since I don’t use Drag+Drop).
Is there a newer repository beside Tempelmann’s?[/quote]
not officiall that I know of…
I personally did a lot of changes to it recently, but all for my own purposes, and it including cutting out chunks I didn’t need
The original version did use an image format that included the mask as a side-by-side image, not layers like today