I was actually wanting to scroll past the end of the doc, beyond the last line of actual text. But I doubt the rve does that. Not a big deal, be nice if it did but no problem.
The scroll code was helpful, thanks. I was just about to try and figure out how to scroll to the end of the doc today so ...
Search found 236 matches
- Thu Aug 19, 2021 5:58 pm
- Forum: Support
- Topic: Scroll Past End of Doc
- Replies: 5
- Views: 15303
- Thu Aug 19, 2021 5:50 pm
- Forum: Support
- Topic: RVStyle1DrawParaBack
- Replies: 2
- Views: 8584
Re: RVStyle1DrawParaBack
Hi Sergey,
Thanks, that did work. Here's how I set mine up for 1 rve:
i := Sender.ItemNo;
if Sender.RVData=rve.RVData then
j := rve.CurItemNo;
repeat
MakeRed := i=j;
if MakeRed then
break;
dec(i);
until TCustomRVData(Sender.RVData).IsFromNewLine(i+1);
if MakeRed then begin
//Canvas.Brush ...
Thanks, that did work. Here's how I set mine up for 1 rve:
i := Sender.ItemNo;
if Sender.RVData=rve.RVData then
j := rve.CurItemNo;
repeat
MakeRed := i=j;
if MakeRed then
break;
dec(i);
until TCustomRVData(Sender.RVData).IsFromNewLine(i+1);
if MakeRed then begin
//Canvas.Brush ...
- Wed Aug 18, 2021 7:53 pm
- Forum: Support
- Topic: RVStyle1DrawParaBack
- Replies: 2
- Views: 8584
RVStyle1DrawParaBack
Sergey,
I am trying to do some drawing on the background using RVStyle1DrawParaBack. But I can't get it to work. I'm trying to just draw a color in the background but only in the current para. I need a way to restrict it to just the para with the cursor in it, otherwise it draws it in every para. I ...
I am trying to do some drawing on the background using RVStyle1DrawParaBack. But I can't get it to work. I'm trying to just draw a color in the background but only in the current para. I need a way to restrict it to just the para with the cursor in it, otherwise it draws it in every para. I ...
- Wed Aug 18, 2021 7:48 pm
- Forum: Support
- Topic: Saving SelStart, SelLen and scroll positions
- Replies: 2
- Views: 8520
Re: Saving SelStart, SelLen and scroll positions
Thanks Sergey, looks like doc properties should work. I'll try it soon.
Edit: Yes, the doc properties worked great. MUCH better than what I was doing. Thanks!
Stan
Edit: Yes, the doc properties worked great. MUCH better than what I was doing. Thanks!
Stan
- Wed Aug 18, 2021 4:04 pm
- Forum: Support
- Topic: Scroll Past End of Doc
- Replies: 5
- Views: 15303
Scroll Past End of Doc
Hi Sergey,
Is there a way to scroll an rve past the end line? I tried rvoScrollToEnd but I don't see it doing anything.
In my scintilla control, I can set it to scroll to the end of the text:
scroll to end.png
Or, scroll past the end:
scroll past end.png
I'd like to get the rve to scroll ...
Is there a way to scroll an rve past the end line? I tried rvoScrollToEnd but I don't see it doing anything.
In my scintilla control, I can set it to scroll to the end of the text:
scroll to end.png
Or, scroll past the end:
scroll past end.png
I'd like to get the rve to scroll ...
- Wed Aug 18, 2021 3:49 pm
- Forum: Support
- Topic: A Way to Update Style Templates After Changes?
- Replies: 22
- Views: 50780
Re: A Way to Update Style Templates After Changes?
Hi Sergey,
OK, I'm using rvfoSaveStyleTemplatesOnlyNames and so far, yes, that seems to work.
Thanks!
Stan
OK, I'm using rvfoSaveStyleTemplatesOnlyNames and so far, yes, that seems to work.
Thanks!
Stan
- Tue Aug 17, 2021 9:04 pm
- Forum: Support
- Topic: Saving SelStart, SelLen and scroll positions
- Replies: 2
- Views: 8520
Saving SelStart, SelLen and scroll positions
Sergey,
I am saving my RVF SelStart, SelLen and scroll positions in the file itself. I prefer that to using an external INI or XML file. Here's what I'm using:
rve.SetItemExtraStrProperty(0, rvespTag,
SelStart.ToString + ',' + SelLen.ToString + ',' +
VScroll.ToString + ',' + HScroll.ToString ...
I am saving my RVF SelStart, SelLen and scroll positions in the file itself. I prefer that to using an external INI or XML file. Here's what I'm using:
rve.SetItemExtraStrProperty(0, rvespTag,
SelStart.ToString + ',' + SelLen.ToString + ',' +
VScroll.ToString + ',' + HScroll.ToString ...
- Tue Aug 17, 2021 2:57 pm
- Forum: Support
- Topic: A Way to Update Style Templates After Changes?
- Replies: 22
- Views: 50780
A Way to Update Style Templates After Changes?
Hi Sergey,
OK, let's say I create a style template: st1. I open or create an RVF and apply the st1 to some text, then save the file. All that works fine.
Now, while the file is closed , let's say I change some parameters of st1 in Delphi. Now, I reopen that saved file again in my app. Any st1 text ...
OK, let's say I create a style template: st1. I open or create an RVF and apply the st1 to some text, then save the file. All that works fine.
Now, while the file is closed , let's say I change some parameters of st1 in Delphi. Now, I reopen that saved file again in my app. Any st1 text ...
- Tue Aug 17, 2021 2:49 pm
- Forum: Support
- Topic: Fastest Way to Get All RVF Text
- Replies: 4
- Views: 14291
Fastest Way to Get All RVF Text
Sergey,
What is the fastest way to get all the plain text from an RVF file? I assume I'd have to load the file into an rve or rv first.
I found rve.GetTextBuf() and RVGetTextRange(). If rve.GetTextBuf() is the best way, do you have example code on how to use that? RVGetTextRange is no problem if ...
What is the fastest way to get all the plain text from an RVF file? I assume I'd have to load the file into an rve or rv first.
I found rve.GetTextBuf() and RVGetTextRange(). If rve.GetTextBuf() is the best way, do you have example code on how to use that? RVGetTextRange is no problem if ...
- Mon Aug 16, 2021 8:21 pm
- Forum: Support
- Topic: InsertText Question
- Replies: 3
- Views: 9906
Re: InsertText Question
Thanks Sergey, that fixed it.
Usually in this part of the code I'm adding to the top of a doc, but I sometimes use it in other places so insert works for me.
Thanks again
Usually in this part of the code I'm adding to the top of a doc, but I sometimes use it in other places so insert works for me.
Thanks again
- Mon Aug 16, 2021 11:52 am
- Forum: Support
- Topic: InsertText Question
- Replies: 3
- Views: 9906
InsertText Question
I have a blank rve. I want to add a break and one return. So, I do this:
rve.InsertBreak( 1, rvbs3d, clNone );
it works fine, just what I want. Now, I want one return after it, so I add this:
rve.InsertText(#13);
That works, but I always get 2 returns, not 1. How do I get 1 return? I've tried ...
rve.InsertBreak( 1, rvbs3d, clNone );
it works fine, just what I want. Now, I want one return after it, so I add this:
rve.InsertText(#13);
That works, but I always get 2 returns, not 1. How do I get 1 return? I've tried ...
- Mon Aug 16, 2021 10:12 am
- Forum: Support
- Topic: Styles and templates
- Replies: 7
- Views: 18975
Re: Styles and templates
Sergey,
Yes, that describes what I was seeing. For now I went with saving the file with just the names of the style templates by setting rvfoSaveStyleTemplatesOnlyNames to true in the RVFOptions. Seems to be working OK. If that causes issues later I can always go back to what I was doing as that ...
Yes, that describes what I was seeing. For now I went with saving the file with just the names of the style templates by setting rvfoSaveStyleTemplatesOnlyNames to true in the RVFOptions. Seems to be working OK. If that causes issues later I can always go back to what I was doing as that ...
- Sun Aug 15, 2021 8:16 pm
- Forum: Support
- Topic: Styles and templates
- Replies: 7
- Views: 18975
Re: Styles and templates
Well, seems to have something to do with whether or not I save paragraphs with rvfoSaveParaStyles, and I do need to save them. I wound up with this code to make it work:
for i := 0 to rve.Style.StyleTemplates.Count-1 do
ShowMessage(i.ToString + ': ' + rve.Style.StyleTemplates[i].Name + ' ' +
rve ...
for i := 0 to rve.Style.StyleTemplates.Count-1 do
ShowMessage(i.ToString + ': ' + rve.Style.StyleTemplates[i].Name + ' ' +
rve ...
- Sun Aug 15, 2021 4:08 pm
- Forum: Support
- Topic: Styles and templates
- Replies: 7
- Views: 18975
Re: Styles and templates
(I assume that only these 3 properties are defined in this styletemplate, other properties are default/inherited)
Also, make sure that rve.UseStyleTemplates = True.
Hi Sergey, Yes, what you listed is all that I'm trying to do right now, and yes, I've had the usestyletemplates thing checked all ...
- Sun Aug 15, 2021 1:04 pm
- Forum: Support
- Topic: Styles and templates
- Replies: 7
- Views: 18975
Re: Styles and templates
Did you include rvpiBackground_Color in rve.Style.StyleTemplates[0].ValidParaProperties?
Also, the result depends on selection and a kind of the paragraph style.
If Kind = rvstkText, this styletemplate is never applied to paragraph, its paragraph properties are ignored.
If Kind = rvstkParaText ...