realbasic-nug
[Top] [All Lists]

Re: Editfield.scrollposition -- how to keep selection visible?

To: REALbasic Network Users Group <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Editfield.scrollposition -- how to keep selection visible?
From: Jon Johnson <jon at mugofcocoa dot com>
Date: Thu, 11 Jul 2002 14:03:25 -0500
You can use lineNumAtCharPos with your selection values to figure out where you want the scrollposition to be set to.

-Jon

On Thursday, July 11, 2002, at 01:53  PM, Erich Rast wrote:

Hi,

I need set the selection of a multiline editfield in code, but the current selection always has to remain visible. So the editfield has to scroll to it when it moves upwards. Does anyone know a decent way to compute the vertical scrollposition such that the selection is in the middle or the bottom of an editfield?

Is there a way to compute the first line and the last line that is fully visible in the editfield?

Thanks and happy computing,

Erich

---
Subscribe to the digest: <mailto:realbasic-nug-
digest at lists dot realsoftware dot com>
Unsubscribe:
<mailto:realbasic-nug-off at lists dot realsoftware dot com>




<Prev in Thread] Current Thread [Next in Thread>