FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Cursor position to last character in the line
Posts: 12
Joined: Thu Nov 17, 2005 02:53 AM
Cursor position to last character in the line
Posted: Wed Nov 02, 2022 03:48 AM

Hi, all

When I use the mouse to click a line (textfield) pass the last character of the line, the cursor is placed at the location of the mouse pointer instead of after the last character of the line. Is it possible the cursor location should place on last character of the line. It may be some changes of TGET.

Thanks

Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Cursor position to last character in the line
Posted: Wed Nov 02, 2022 04:17 AM
Try
Code (fw): Select all Collapse
   oGet:bGotFocus := { || oGet:nPos := Len( oGet:GetText() ) + 1, oGet:SetPos( oGet:nPos ) }
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 12
Joined: Thu Nov 17, 2005 02:53 AM
Re: Cursor position to last character in the line
Posted: Wed Nov 02, 2022 04:29 AM

thanks cnavarro,

oGet:bGotFocus := { || oGet:nPos := Len( oGet:GetText() ) + 1, oGet:SetPos( oGet:nPos ) }

where should I put on this control statement

Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Cursor position to last character in the line
Posted: Wed Nov 02, 2022 04:33 AM
After control definition
Code (fw): Select all Collapse
   @ 1, 1 GET oGet ....
   oGet:bLostFocus := ....
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 12
Joined: Thu Nov 17, 2005 02:53 AM
Re: Cursor position to last character in the line
Posted: Wed Nov 02, 2022 06:43 AM

thanks cnavarro,

Since according to our user opinion, it is the standard windows behaviour , how I can apply to whole fw application system, is it that control be on TGET ...

Thanks a lot

Continue the discussion