Excellent! Thank you Sergey.
Dale
Search found 20 matches
- Mon Jul 24, 2023 3:25 pm
- Forum: Support
- Topic: How to find first visible item in editor?
- Replies: 16
- Views: 51371
- Fri Jul 21, 2023 5:40 pm
- Forum: Support
- Topic: How to find first visible item in editor?
- Replies: 16
- Views: 51371
Re: How to find first visible item in editor?
Stan! I'm really, really embarrassed! I've been programming for decades and I made the newbie mistake of getting a variable mixed up in my test routine. I was looking at bad data all along. FirstItemVisible is working now (and useful?). I found it when I was making a little demo for you. That's what ...
- Fri Jul 21, 2023 3:57 pm
- Forum: Support
- Topic: How to find first visible item in editor?
- Replies: 16
- Views: 51371
Re: How to find first visible item in editor?
Hi Stan, I don't have any issues with it being zero based. The problem is when line 0 (or what I am calling the first line), rve.FIrstItemVisible returns 0, but when I then scroll so that line 1 is at the top, it still returns 0. Then when 2 is at the top, still 0, then it finally starts ...
- Fri Jul 21, 2023 3:07 pm
- Forum: Support
- Topic: How to find first visible item in editor?
- Replies: 16
- Views: 51371
Re: How to find first visible item in editor?
This is brute force, but it might work. This gives me the item number, and where it is. I can then test it to make sure it is on the document, and as an added bonus, since I have the coordinates, I can do a little math to make sure that my linenumbers line up properly where I print them outside of ...
- Fri Jul 21, 2023 2:34 pm
- Forum: Support
- Topic: How to find first visible item in editor?
- Replies: 16
- Views: 51371
Re: How to find first visible item in editor?
Hi Stan, The problem is that rve.FirstItemVisible is not giving me the correct results. In the example below it should return 4 but instead returns 2. Maybe I should be looking through the paragraphs and testing if their XY location falls in the document space (not quite sure how to do that yet but ...
- Thu Jul 20, 2023 8:50 pm
- Forum: Support
- Topic: How to find first visible item in editor?
- Replies: 16
- Views: 51371
Re: How to find first visible item in editor?
It's just basically a simple text editor for writing small scripts for our application (like a very basic code editor). Word wrapping is turned off so every line is a paragraph. I can write the numbers beside the editor using Canvas.TextOut, but I need to know what the first line (paragraph) is so ...
- Thu Jul 20, 2023 6:55 pm
- Forum: Support
- Topic: How to find first visible item in editor?
- Replies: 16
- Views: 51371
Re: How to find first visible item in editor?
Thanks Stan!
It almost works. It does not seem to be consistent. If line 1 or 2 are at the top, it will still return 0, then if line three is at the top, it will return 1.
I'm trying to draw line numbers next to the editor.
Dale
It almost works. It does not seem to be consistent. If line 1 or 2 are at the top, it will still return 0, then if line three is at the top, it will return 1.
I'm trying to draw line numbers next to the editor.
Dale
- Thu Jul 20, 2023 4:35 pm
- Forum: Support
- Topic: How to find first visible item in editor?
- Replies: 16
- Views: 51371
How to find first visible item in editor?
Hi,
I need to know what the first visible paragraph is in a richview editor. For instance, for a TRichEdit, it would do
iFirstVisible := ARichEdit.Perform(EM_GETFIRSTVISIBLELINE, 0, 0,);
How can I get this information from a TRichViewEdit?
Thanks.
Dale
I need to know what the first visible paragraph is in a richview editor. For instance, for a TRichEdit, it would do
iFirstVisible := ARichEdit.Perform(EM_GETFIRSTVISIBLELINE, 0, 0,);
How can I get this information from a TRichViewEdit?
Thanks.
Dale
- Tue Nov 10, 2015 12:00 pm
- Forum: Support
- Topic: Want to make sure I am using RVAControlPanel correctly.
- Replies: 3
- Views: 15001
- Mon Nov 09, 2015 11:08 pm
- Forum: Support
- Topic: Want to make sure I am using RVAControlPanel correctly.
- Replies: 3
- Views: 15001
- Mon Nov 09, 2015 11:03 pm
- Forum: Support
- Topic: Want to make sure I am using RVAControlPanel correctly.
- Replies: 3
- Views: 15001
Want to make sure I am using RVAControlPanel correctly.
Hi: I just want to make sure I am using the RVAControlPanel correctly. I have a database program with three different memo fields. Each memo field uses a TRichViewEdit to handle RTF. (I'm not using TDBRichViewEdit). I have created a toolbar for each of the three memo's. (three toolbars, each ...
- Tue Jul 30, 2013 3:03 pm
- Forum: Support
- Topic: Need to strip out images when pasting HTML
- Replies: 3
- Views: 13374
Hi Sergey: A user would highlight the desired portion of a web-page that they want, then copy and paste it into TRichView. If it contained any images, I can't allow them to be pasted. I am using the THTMLView and RVHTMLViewImporter. I think I found a solution though. In rvHtmlViewImport, I just put ...
- Mon Jul 29, 2013 9:52 pm
- Forum: Support
- Topic: Need to strip out images when pasting HTML
- Replies: 3
- Views: 13374
Need to strip out images when pasting HTML
I need to strip out all images when pasting HTML into TRichViewEdit (set up as RTF editor). I'm trying to use the technique explained here http://www.trichview.com/forums/viewtopic.php?t=5174 .... however, when i paste from HTML, the OnPaste event never fires so this code never runs. Anyone have any ...
- Fri Dec 03, 2010 4:24 pm
- Forum: Support
- Topic: Unmatched Brace error when using rv.LoadRTFFromStream
- Replies: 3
- Views: 11924
- Fri Dec 03, 2010 3:55 pm
- Forum: Support
- Topic: Unmatched Brace error when using rv.LoadRTFFromStream
- Replies: 3
- Views: 11924
Unmatched Brace error when using rv.LoadRTFFromStream
Hello: When I try to load the following rtf text into an TRichView using LoadRTFFromStream, I get an Unmatched Brace error..... however, the exact same string displays fine when read by a DBRichViewEdit from a CLOB field. What is wrong with the rtf string? And why does it work from a CLOB field but ...