FROM : Stéphane Sudre
DATE : Sat Nov 24 02:50:51 2007
What's the obvious API I'm missing to scroll to the real top of a
document displayed in a NSTextView?
I have a NSTextView with a TextContainer Inset set to (6.0f,6.0f).
When I replace the content of the NSTextView through its container
(usual beginEditing, readFromURL, ...) code, I end up with the document
not being displayed perfectly correctly. The document (if higher than
the view) is scrolled bit so that the first line of text is stuck to
the top of the scrollview instead of being 6 points away.
I tried to use the scrollPoint or scrollRangeVisibleSomething API with
different reasonable values, give a look at the GNUStep source code,
change the frame of the NSTextView and its clipview, etc. with no
success.
The document is still scrolled by default by a small amount (and it's
probably the TextContainer Inset height).
DATE : Sat Nov 24 02:50:51 2007
What's the obvious API I'm missing to scroll to the real top of a
document displayed in a NSTextView?
I have a NSTextView with a TextContainer Inset set to (6.0f,6.0f).
When I replace the content of the NSTextView through its container
(usual beginEditing, readFromURL, ...) code, I end up with the document
not being displayed perfectly correctly. The document (if higher than
the view) is scrolled bit so that the first line of text is stuck to
the top of the scrollview instead of being 6 points away.
I tried to use the scrollPoint or scrollRangeVisibleSomething API with
different reasonable values, give a look at the GNUStep source code,
change the frame of the NSTextView and its clipview, etc. with no
success.
The document is still scrolled by default by a small amount (and it's
probably the TextContainer Inset height).
| Related mails | Author | Date |
|---|---|---|
| No related mails found. | ||






Cocoa mail archive

