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

Underlined text cursor moves to end of field.



Q. Any suggestions how to define a GenTextClass object that has the
   cursor always at the start? Problem is that when a page becomes
   visible all is okay, but after I move up and down between the
   text objects, the cursor is set to the end of the fields.

A. This is caused by the UnderlinedVisTextClass whenever it loses the
   focus. It queues up a MSG_UVT_MOVE_TO_END_IF_NOT_FOCUSED so that the
   next time the object gets the focus the cursor will be at the end.

   To avoid this, simply define your own subclass of
   UnderlinedVisTextClass and intercept
   MSG_UVT_MOVE_TO_END_IF_NOT_FOCUSED to do nothing. If you're using
   UnderlinedGenTextClass, then be sure to have a line like this in
   your subclass declaration:

      @uses UnderlinedVisTextClass; // see GenTextClass for example

   This allows you to intercept UnderlinedVisTextClass messages even
   though you're really defining a subclass of UnderlinedGenTextClass.

   By the way, a simple GenText object does not exemplify this behavior.