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

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

Postby Jimmy » Sat Jun 10, 2023 11:20 pm

hi,

i have Set EDIT_NONE and use oWnd:bKeyDown to react on VK_RETURN
Code: Select all  Expand view
  oBrw:nEditTypes := EDIT_NONE

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


Code: Select all  Expand view
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: 1725
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

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

Postby Jimmy » Sun Jun 11, 2023 3:39 am

hi,

have found nMoveType
Code: Select all  Expand view
  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 view
#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 view
  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: 1725
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

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

Postby Jimmy » Mon Jun 12, 2023 4: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: Select all  Expand view

      CASE nKey = VK_ADD
         IF EMPTY(aHead)
            oBrw:EditSource( .F., Struc2String( ALIAS() ) )
         ELSE
            oBrw:EditSource( .F., Struc2String( aHead ) )
         ENDIF
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1725
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany


Return to FiveWin for Harbour/xHarbour

Who is online

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