Does anyone have some code handy to find the next widget in the tab order on a screen? OE10.1B. We programatically hide certain widgets on the screen and therefore we need to be able to establish which widget to apply entry to when manually applying entry in the code. If that makes sense.
here's a snippet that I know doesn't work... it just seems to find the first widget on the screen.
here's a snippet that I know doesn't work... it just seems to find the first widget on the screen.
Code:
FocusLoop:
REPEAT WHILE VALID-HANDLE(pvFocusHandle):
IF pvFocusHandle:TYPE NE "WINDOW" AND
pvFocusHandle:TYPE NE "FRAME" AND
pvFocusHandle:TYPE NE "DIALOG-BOX" AND
pvFocusHandle:TYPE NE "FIELD-GROUP" THEN
DO:
IF pvFocusHandle:TYPE NE "RECTANGLE" AND
pvFocusHandle:TYPE NE "MENU-ITEM" AND
pvFocusHandle:TYPE NE "MENU" AND
pvFocusHandle:TYPE NE "TEXT" AND
pvFocusHandle:TYPE NE "LITERAL" AND
pvFocusHandle:HELP NE "HIDDEN" AND
pvFocusHandle:SENSITIVE AND
pvFocusHandle:VISIBLE THEN
DO:
APPLY "ENTRY" TO pvFocusHandle.
LEAVE FocusLoop.
END.
ELSE
pvFocusHandle = pvFocusHandle:NEXT-SIBLING NO-ERROR.
END.
ELSE
pvFocusHandle = pvFocusHandle:FIRST-CHILD NO-ERROR.
END.