FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Cursor in XBROWSE "down" instead of "right" after ENTER
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Cursor in XBROWSE "down" instead of "right" after ENTER
Posted: Sat Jun 10, 2023 11:20 PM
hi,

i have Set EDIT_NONE and use oWnd:bKeyDown to react on VK_RETURN
Code (fw): Select all Collapse
   oBrw:nEditTypes := EDIT_NONE

   oWnd:bKeyDown := { | nKey, nFlag | DoBrowseKey( nKey, nFlag, oWnd, oGet, oBar, oBrw, aHead ) }
Code (fw): Select all Collapse
STATIC PROCEDURE DoBrowseKey( nKey, nFlag, oWnd, oGet, oBar, oBrw , aHead)
DEFAULT aHead := {}

   DO CASE
      CASE nKey = VK_ESCAPE
         oWnd:End()

      CASE nKey = VK_RETURN
         IF EMPTY(aHead)
            oBrw:EditSource( .F., Struc2String( ALIAS() ) )
         ELSE
            oBrw:EditSource( .F., Struc2String( aHead ) )
         ENDIF
this work fine but Cursor in XBROWSE is move to "right" and i want "down" ... how :?:
greeting,

Jimmy
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: Cursor in XBROWSE "down" instead of "right" after ENTER
Posted: Sun Jun 11, 2023 03:39 AM
hi,

have found nMoveType
Code (fw): Select all Collapse
   DATA nMoveType;      // 1 Move Right
        AS NUMERIC      // 2 Move Left
                        // 3 Move Up
                        // 4 Move down
                        // 5 No Move
                        // 6 Move Right with lFastedit features, only work with lFastEdit := .t.
                        // 7 Move left with lFastedit features, only work with lFastEdit := .t.
Code (fw): Select all Collapse
#define MOVE_RIGHT            1
#define MOVE_LEFT             2
#define MOVE_UP               3
#define MOVE_DOWN             4
#define MOVE_NONE             5
#define MOVE_FAST_RIGHT       6
#define MOVE_FAST_LEFT        7
so i try
Code (fw): Select all Collapse
   oBrw:nMoveType := MOVE_DOWN // 4 Move down
   oBrw:nMoveType := MOVE_NONE // 5 No Move
but it still move "right" when press ENTER :(

can somebody show me please a Sample how to move "down"
greeting,

Jimmy
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: Cursor in XBROWSE "down" instead of "right" after ENTER
Posted: Mon Jun 12, 2023 04:14 AM
i found "Problem" why it move "right"

i have to use Option FASTEDIT and oBrw:nEditTypes := EDIT_GET for ENTER
when use EDIT_NONE it move "right" after ENTER

so i must use "other" Key for oBrw:EditSource(()
Code (fw): Select all Collapse
      CASE nKey = VK_ADD
         IF EMPTY(aHead)
            oBrw:EditSource( .F., Struc2String( ALIAS() ) )
         ELSE
            oBrw:EditSource( .F., Struc2String( aHead ) )
         ENDIF
greeting,

Jimmy

Continue the discussion