views:

114

answers:

1

I have a TextField() with a quite long text , sometimes last lines are not visible on screen (without scrolling).

Now I want to detect if e.g. word IBM is currently visible on screen, or is it outside of screen. Any ideas how to do this? I want to display this particular word IBM by scrolling myself the textField() to the right position.

+1  A: 

Check the documentation of the getLineIndexOfChar() to determine the line which contains a given character, then compare the retreived value with scrollV and bottomScrollV to determine if the given line is visible or not.

David Hanak