Cursor in XBROWSE "down" instead of "right" after ENTER

Post Reply
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Cursor in XBROWSE "down" instead of "right" after ENTER

Post by Jimmy »

hi,

i have Set EDIT_NONE and use oWnd:bKeyDown to react on VK_RETURN

Code: Select all | Expand

   oBrw:nEditTypes := EDIT_NONE

   oWnd:bKeyDown := { | nKey, nFlag | DoBrowseKey( nKey, nFlag, oWnd, oGet, oBar, oBrw, aHead ) }

Code: Select all | Expand

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
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Re: Cursor in XBROWSE "down" instead of "right" after ENTER

Post by Jimmy »

hi,

have found nMoveType

Code: Select all | Expand

   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: Select all | Expand

#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: Select all | Expand

   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
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

Re: Cursor in XBROWSE "down" instead of "right" after ENTER

Post by Jimmy »

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: Select all | Expand

      CASE nKey = VK_ADD
         IF EMPTY(aHead)
            oBrw:EditSource( .F., Struc2String( ALIAS() ) )
         ELSE
            oBrw:EditSource( .F., Struc2String( aHead ) )
         ENDIF
greeting,
Jimmy
Post Reply