Initial cursor position in a TEXTBOX or GETBOX

77 views
Skip to first unread message

Ronaldo Geniais

unread,
Sep 1, 2021, 10:48:13 AM9/1/21
to Harbour Users
In a control (TEXTBOX or GETBOX), when the control receives focus with TAB, the cursor is automatically positioned at the initial position, but when the focus is done by the mouse, the positioning occurs according to the mouse pointer.
How is it possible to adjust this behavior, that is, that the positioning takes place in the initial position?

Franz

unread,
Sep 2, 2021, 2:33:41 AM9/2/21
to Harbour Users
This is a very bad feature in HMG. I asked to correct it many years ago but with no result (First changed, then deleted the change)

You have to insert in line 2134 of h_events.prg these lines:

   *---------------------- FRANZ
            IF _HMG_aControlType [i] = 'GETBOX' .and. (Valtype(_HMG_aControlValue[i]) = "D" .or. Valtype(_HMG_aControlValue[i]) = "C")
               _PushKey(VK_HOME) && cursor at the beginning of the text or  _PushKey(VK_END)  && cursor at the end of the text
            ENDIF
 *---------------------- END FRANZ

Ciao
Franz
Reply all
Reply to author
Forward
0 new messages