How do you TAB out of an editable browse

Cecil

19+ years progress programming and still learning.
I have fielded an editable browse. When I tab through the browser and I get to the last row and the cursor is sitting in an editable column when I press TAB key I want to jump to the next field. And the same goes for SHIFT-TAB.

Once you TAB into an editable browse, you can't get out.

How do I do this?

WINDOWS GUI.
OE11.6
 

Cecil

19+ years progress programming and still learning.
Fixed it I had a space after the word "ENTRY "
APPLY "ENTRY":U TO hPrevTabItem.

But, a follow-on question. How can to tell if you are at the first & last row of a BROWSE widget programmatically?
 

Cecil

19+ years progress programming and still learning.
Figured it out:

Code:
ON BACK-TAB OF ttFoobar.fieldabc IN BROWSE brFoobar DO:
    DEFINE VARIABLE hPrevTabItem AS HANDLE      NO-UNDO.
 
    hPrevTabItem = BROWSE brFoobar:PREV-TAB-ITEM.
        
    IF VALID-HANDLE(hPrevTabItem) THEN
    DO:

        IF CURRENT-RESULT-ROW("brFoobar") EQ 1 THEN
        DO WITH FRAME {&FRAME-NAME}:
            brFoobar:DESELECT-ROWS().
            APPLY "ENTRY":U TO hPrevTabItem.
            RETURN NO-APPLY.    /** Suppress the TAB event**/
        END.
    END.
END.

Code:
ON TAB OF ttFoobar.fieldabcIN BROWSE brFoobar DO:
DEFINE VARIABLE hNextTabItem AS HANDLE      NO-UNDO.
  
    hNextTabItem = BROWSE brFoobar:NEXT-TAB-ITEM.
        
    IF VALID-HANDLE(hNextTabItem) THEN
    DO:
        IF CURRENT-RESULT-ROW("brFoobar":U) EQ NUM-RESULTS ( "brFoobar":U ) THEN
        DO WITH FRAME {&FRAME-NAME}:
            brFoobar :DESELECT-ROWS().

            APPLY "ENTRY":U TO hNextTabItem.

            RETURN NO-APPLY.    /** Suppress the TAB event**/
        END.
    END.
END.
 
Top