Cursor position to last character in the line

Cursor position to last character in the line

Postby kkyung » Wed Nov 02, 2022 3: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
kkyung
 
Posts: 12
Joined: Thu Nov 17, 2005 2:53 am

Re: Cursor position to last character in the line

Postby cnavarro » Wed Nov 02, 2022 4:17 am

Try
Code: Select all  Expand view

   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
User avatar
cnavarro
 
Posts: 6541
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Cursor position to last character in the line

Postby kkyung » Wed Nov 02, 2022 4:29 am

thanks cnavarro,

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

where should I put on this control statement
kkyung
 
Posts: 12
Joined: Thu Nov 17, 2005 2:53 am

Re: Cursor position to last character in the line

Postby cnavarro » Wed Nov 02, 2022 4:33 am

After control definition
Code: Select all  Expand view

   @ 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
User avatar
cnavarro
 
Posts: 6541
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Cursor position to last character in the line

Postby kkyung » Wed Nov 02, 2022 6: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
kkyung
 
Posts: 12
Joined: Thu Nov 17, 2005 2:53 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 97 guests