FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour oJump for Antonio
Posts: 1048
Joined: Mon Oct 24, 2005 09:54 AM
oJump for Antonio
Posted: Mon Jan 14, 2019 03:36 PM
Antonio, you set oJump after one navigation to this control to NIL, but if going again to the same control now the oJump is no further functioning as it is NIL!?
Code (fw): Select all Collapse
METHOD ForWhen() CLASS TControl
……...
   // keyboard navigation
   if ::oJump != nil
      SetFocus( ::oJump:hWnd )
      ::oJump = nil
…...
Regards,
Günther
---------------------------------
office@byte-one.com
Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM
Re: oJump for Antonio
Posted: Mon Jan 14, 2019 04:18 PM
Günther

I deleted my post after re-reading your initial post about oBtn ... here is the code I deleted that pertained to the oJump method ..

Code (fw): Select all Collapse
REDEFINE GET oPosition  VAR cPosition  ID 142 of oGrps PICTURE "@!" BITMAP "find";
      ACTION ( _PosGet( cMode,@cPosition,oPosition,oPositionAbbr,@cPositionAbbr,"BUTTON",;
                          oButt1,oButt2,oRsEmp ),;
                          oPositionAbbr:SetFocus(),oPositionAbbr:oJump := oPositionAbbr ) UPDATE
       oPosition:lAdjustBtn := .t.

       oPosition:bKeyDown := {|nK| if( nK==VK_RETURN,( ;
               _PosGet( cMode,@cPosition,oPosition,oPositionAbbr,@cPositionAbbr,"FIELD",;
                          oButt1,oButt2,oRsEmp ),;
                          oOrganU:SetFocus(),oOrganU:oJump := oOrganU ), ) }

   REDEFINE GET oPositionAbbr     VAR cPositionAbbr ID 148 of oGRPS UPDATE //COLOR CLR_BLACK, 16053492 READONLY


In the above code .. tget is evaluating the bKeydown code block and traps the <enter> key .. thereby blocking the navigation to the next field .. I believe the above code was inspired my Antonio .. I mention oJump in my deleted post and noted that if was a bit clumsy and your solution seemed much more elegant .. Hope this post is relevant to your tget enhancement.

Rick Lipkin

Continue the discussion