FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Force cursor to end of text in GET
Posts: 933
Joined: Sun Oct 09, 2005 01:05 PM
Force cursor to end of text in GET
Posted: 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

Thanks,

Jeff Barnes



(FWH 16.11, xHarbour 1.2.3, Bcc730)
Posts: 1096
Joined: Fri Oct 28, 2005 02:27 AM
Force cursor to end of text in GET
Posted: Mon Dec 04, 2006 01: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:

fwKeyboard(oGet,VK_END)
.
.
function FWKeyBoard(oWnd, nKey)
  oWnd:SetFocus()
  oWnd:PostMsg(WM_KEYDOWN, nKey, 0)
return nil
FWH 11.08/FWH 19.12

BCC5.82/BCC7.3

xHarbour/Harbour
Posts: 83
Joined: Mon Oct 17, 2005 10:33 AM
Force cursor to end of text in GET
Posted: 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

Continue the discussion