Force cursor to end of text in GET

Force cursor to end of text in GET

Postby Jeff Barnes » Mon Dec 04, 2006 12:27 am

Hi Everybody,

How can I force the cursor to move to the right side of the last text entry in a get.


Ex.

"This is the text." appears in the get, I would like to force the cursor to go to the right side of the period.


Thanks,
Jeff
User avatar
Jeff Barnes
 
Posts: 929
Joined: Sun Oct 09, 2005 1:05 pm
Location: Ontario, Canada

Postby hua » Mon Dec 04, 2006 1:25 am

The one that immediately come to mind is something like this.
At the point where you want the behaviour to be invoked, just place:

Code: Select all  Expand view  RUN
fwKeyboard(oGet,VK_END)
.
.
function FWKeyBoard(oWnd, nKey)
  oWnd:SetFocus()
  oWnd:PostMsg(WM_KEYDOWN, nKey, 0)
return nil
hua
 
Posts: 1072
Joined: Fri Oct 28, 2005 2:27 am

Postby Dietmar Jahnel » Mon Dec 04, 2006 10:06 am

Thats what I use:

auGet:SetPos(len(trim(auGet:cText)))

or

auGet:KeyDown(VK_RIGHT)

both are working.

Dietmar
User avatar
Dietmar Jahnel
 
Posts: 83
Joined: Mon Oct 17, 2005 10:33 am
Location: Austria


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 58 guests