Article # 373, added by Geoworks, historical record
| first | previous | index | next | last |

Grabbing a line of text under the mouse.



Q. How do I detect a mouse click on a text object at a given line, and
   then get the text for just that line?

A. Subclass MSG_META_START_SELECT, and given the mouse position,
   Use: MSG_VIS_TEXT_GET_TEXT_POSITION_FROM_COORD to map the mouse
   click to a text position, MSG_VIS_TEXT_GET_LINE_FROM_OFFSET to
   map from a text offset to a line, and MSG_VIS_TEXT_GET_LINE_INFO
   to get the number of characters in the line, then you can grab
   the text using MSG_VIS_TEXT_GET_TEXT_RANGE or one of its brethren.