View Full Version : Index bounds of a textarea

03-13-2009, 03:49 PM
I would like to be able to determine the character index of the first(upper right) visible character in a textArea as well as the last (lower left). Understanding that lower-left may be more complex, Im starting with upper-right. Im using the mx_internal::getTextField() method and then using getCharIndexAtPoint(x,y). Initially I chose 1,1 for x and y but this seems to always return an index of -1. If I inflate x an y to 3,3 I get an index of 0 which initially makes sense. The problem is that when I put enough data in and scroll the text area, the returned index remain 0.

Any thoughts, tips, or pointers?


03-13-2009, 07:41 PM
As an update, it appears that there is an intrinsic gutter of "2" which means that the character at 2,2 will always be the upper left character. The failure to update is a problem with my understanding of the event system and what fires when.