Page 1 of 1

Interesting...

Posted: Mon Mar 13, 2006 6:41 pm
by SKinneyx1
Tell me where I'm going wrong here:

I've wrote a little application to display PDB Documents. When a document is closed I want to capture the last page the user was viewing so that when they reopen the document I can put them back there.

Accordingly, I snag RichView1.FirstItemVisible during closing. Works fine. However, when I go to put them back it always comes up several paragraphs shy. Digging through the code, the only thing I could find to set the position was SetSelectionBounds. Is there something else to set the first visible item that I'm missing?

Thanks.

Posted: Mon Mar 13, 2006 9:11 pm
by Sergey Tkachenko
FirstItemVisible is not very accurate, it can return an item just on top of visible area.

If editor window in your application has a fixed width (or its width is restored to the last remembered value when the application starts), the simplest way is to store and restore VScrollPos value.