Saving SelStart, SelLen and scroll positions
Posted: Tue Aug 17, 2021 9:04 pm
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:When I read it back, I use this:
This is actually working pretty well, and I'll do some additional error trapping later. But my questions now are:
Stan
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:
Code: Select all
rve.SetItemExtraStrProperty(0, rvespTag,
SelStart.ToString + ',' + SelLen.ToString + ',' +
VScroll.ToString + ',' + HScroll.ToString ) ;
rve.SaveRVF( EntryPath + FileName, false );
Code: Select all
SelStart := 0;
SelLen := 0;
VScroll := 0;
HScroll := 0;
tempList:= TStringList.Create;
rve.GetItemExtraStrProperty(0, rvespTag, temp );
tempList.DelimitedText := temp;
if tempList.Count = 4 then
begin
SelStart := StrToInt(tempList.Strings[0]);
SelLen := StrToInt(tempList.Strings[1]);
VScroll := StrToInt(tempList.Strings[2]);
HScroll := StrToInt(tempList.Strings[3]);
end;
- Is there a built-in function somewhere that will do this that I've missed?
- If not, is using GetItemExtraStrProperty(0, rvespTag, temp ) OK?
- Will using GetItemExtraStrProperty on item 0 cause a problem if I added a regular tag to that item later?
Stan