Interesting...

General TRichView support forum. Please post your questions here
Post Reply
SKinneyx1
Posts: 4
Joined: Sun Feb 05, 2006 6:52 pm

Interesting...

Post 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.
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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.
Post Reply